import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String s = br.readLine();

		if (!s.startsWith("A")) {
			System.out.println("WA");
			return;
		}

		int cindex = -1;
		String ss = s.substring(2, s.length() - 1);
		for (int i = 0; i < ss.length(); i++) {
			if (ss.charAt(i) == 'C') {
				if (cindex == -1) {
					cindex = i + 2;
				} else {
					System.out.println("WA");
					return;
				}
			}
		}

		if (cindex == -1) {
			System.out.println("WA");
			return;
		}
		boolean flag = false;

		for (int i = 0; i < s.length(); i++) {
			if (i == 0 || i == cindex)
				continue;
			if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
				flag = true;
			}
		}

		System.out.println(flag ? "WA" : "AC");

	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String s = br.readLine();

		if (!s.startsWith("A")) {
			System.out.println("WA");
			return;
		}

		int cindex = -1;
		String ss = s.substring(2, s.length() - 1);
		for (int i = 0; i < ss.length(); i++) {
			if (ss.charAt(i) == 'C') {
				if (cindex == -1) {
					cindex = i + 2;
				} else {
					System.out.println("WA");
					return;
				}
			}
		}

		if (cindex == -1) {
			System.out.println("WA");
			return;
		}
		boolean flag = false;

		for (int i = 0; i < s.length(); i++) {
			if (i == 0 || i == cindex)
				continue;
			if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
				flag = true;
			}
		}

		System.out.println(flag ? "WA" : "AC");

	}

} Main public static void main(String[] args) throws NumberFormatException, IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String s = br.readLine();

		if (!s.startsWith("A")) {
			System.out.println("WA");
			return;
		}

		int cindex = -1;
		String ss = s.substring(2, s.length() - 1);
		for (int i = 0; i < ss.length(); i++) {
			if (ss.charAt(i) == 'C') {
				if (cindex == -1) {
					cindex = i + 2;
				} else {
					System.out.println("WA");
					return;
				}
			}
		}

		if (cindex == -1) {
			System.out.println("WA");
			return;
		}
		boolean flag = false;

		for (int i = 0; i < s.length(); i++) {
			if (i == 0 || i == cindex)
				continue;
			if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
				flag = true;
			}
		}

		System.out.println(flag ? "WA" : "AC");

	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String s = br.readLine();

		if (!s.startsWith("A")) {
			System.out.println("WA");
			return;
		}

		int cindex = -1;
		String ss = s.substring(2, s.length() - 1);
		for (int i = 0; i < ss.length(); i++) {
			if (ss.charAt(i) == 'C') {
				if (cindex == -1) {
					cindex = i + 2;
				} else {
					System.out.println("WA");
					return;
				}
			}
		}

		if (cindex == -1) {
			System.out.println("WA");
			return;
		}
		boolean flag = false;

		for (int i = 0; i < s.length(); i++) {
			if (i == 0 || i == cindex)
				continue;
			if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
				flag = true;
			}
		}

		System.out.println(flag ? "WA" : "AC");

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String s = br.readLine(); s br.readLine() br.readLine br if (!s.startsWith("A")) {
			System.out.println("WA");
			return;
		} !s.startsWith("A") s.startsWith("A") s.startsWith s "A" {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; int cindex = -1; cindex -1 1 String ss = s.substring(2, s.length() - 1); ss s.substring(2, s.length() - 1) s.substring s 2 s.length() - 1 s.length() s.length s 1 for (int i = 0; i < ss.length(); i++) {
			if (ss.charAt(i) == 'C') {
				if (cindex == -1) {
					cindex = i + 2;
				} else {
					System.out.println("WA");
					return;
				}
			}
		} int i = 0; int i = 0; i 0 i < ss.length() i ss.length() ss.length ss i++ i++ i {
			if (ss.charAt(i) == 'C') {
				if (cindex == -1) {
					cindex = i + 2;
				} else {
					System.out.println("WA");
					return;
				}
			}
		} {
			if (ss.charAt(i) == 'C') {
				if (cindex == -1) {
					cindex = i + 2;
				} else {
					System.out.println("WA");
					return;
				}
			}
		} if (ss.charAt(i) == 'C') {
				if (cindex == -1) {
					cindex = i + 2;
				} else {
					System.out.println("WA");
					return;
				}
			} ss.charAt(i) == 'C' ss.charAt(i) ss.charAt ss i 'C' {
				if (cindex == -1) {
					cindex = i + 2;
				} else {
					System.out.println("WA");
					return;
				}
			} if (cindex == -1) {
					cindex = i + 2;
				} else {
					System.out.println("WA");
					return;
				} cindex == -1 cindex -1 1 {
					cindex = i + 2;
				} cindex = i + 2 cindex i + 2 i 2 {
					System.out.println("WA");
					return;
				} System.out.println("WA") System.out.println System.out System System.out "WA" return; if (cindex == -1) {
			System.out.println("WA");
			return;
		} cindex == -1 cindex -1 1 {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; boolean flag = false; flag false for (int i = 0; i < s.length(); i++) {
			if (i == 0 || i == cindex)
				continue;
			if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
				flag = true;
			}
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
			if (i == 0 || i == cindex)
				continue;
			if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
				flag = true;
			}
		} {
			if (i == 0 || i == cindex)
				continue;
			if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
				flag = true;
			}
		} if (i == 0 || i == cindex)
				continue; i == 0 || i == cindex i == 0 i 0 i == cindex i cindex continue; if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
				flag = true;
			} s.charAt(i) < 'a' || 'z' < s.charAt(i) s.charAt(i) < 'a' s.charAt(i) s.charAt s i 'a' 'z' < s.charAt(i) 'z' s.charAt(i) s.charAt s i {
				flag = true;
			} flag = true flag true System.out.println(flag ? "WA" : "AC") System.out.println System.out System System.out flag ? "WA" : "AC" flag "WA" "AC" String[] args args public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String s = br.readLine();

		if (!s.startsWith("A")) {
			System.out.println("WA");
			return;
		}

		int cindex = -1;
		String ss = s.substring(2, s.length() - 1);
		for (int i = 0; i < ss.length(); i++) {
			if (ss.charAt(i) == 'C') {
				if (cindex == -1) {
					cindex = i + 2;
				} else {
					System.out.println("WA");
					return;
				}
			}
		}

		if (cindex == -1) {
			System.out.println("WA");
			return;
		}
		boolean flag = false;

		for (int i = 0; i < s.length(); i++) {
			if (i == 0 || i == cindex)
				continue;
			if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
				flag = true;
			}
		}

		System.out.println(flag ? "WA" : "AC");

	}

} public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String s = br.readLine();

		if (!s.startsWith("A")) {
			System.out.println("WA");
			return;
		}

		int cindex = -1;
		String ss = s.substring(2, s.length() - 1);
		for (int i = 0; i < ss.length(); i++) {
			if (ss.charAt(i) == 'C') {
				if (cindex == -1) {
					cindex = i + 2;
				} else {
					System.out.println("WA");
					return;
				}
			}
		}

		if (cindex == -1) {
			System.out.println("WA");
			return;
		}
		boolean flag = false;

		for (int i = 0; i < s.length(); i++) {
			if (i == 0 || i == cindex)
				continue;
			if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
				flag = true;
			}
		}

		System.out.println(flag ? "WA" : "AC");

	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String s = br.readLine();

		if (!s.startsWith("A")) {
			System.out.println("WA");
			return;
		}

		int cindex = -1;
		String ss = s.substring(2, s.length() - 1);
		for (int i = 0; i < ss.length(); i++) {
			if (ss.charAt(i) == 'C') {
				if (cindex == -1) {
					cindex = i + 2;
				} else {
					System.out.println("WA");
					return;
				}
			}
		}

		if (cindex == -1) {
			System.out.println("WA");
			return;
		}
		boolean flag = false;

		for (int i = 0; i < s.length(); i++) {
			if (i == 0 || i == cindex)
				continue;
			if (s.charAt(i) < 'a' || 'z' < s.charAt(i)) {
				flag = true;
			}
		}

		System.out.println(flag ? "WA" : "AC");

	}

}