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

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char[] s = br.readLine().toCharArray();
		br.close();

		if (s[0] != 'A') {
			System.out.println("WA");
			return;
		}

		int cnt = 0;
		for (int i = 2; i < s.length - 1; i++) {
			if (s[i] == 'C') {
				cnt++;
			}
		}
		if (cnt != 1) {
			System.out.println("WA");
			return;
		}

		for (int i = 1; i < s.length; i++) {
			if (s[i] != 'C') {
				int x = s[i] - 'a';
				if (x < 0 || 26 <= x) {
					System.out.println("WA");
					return;
				}
			}
		}
		System.out.println("AC");
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char[] s = br.readLine().toCharArray();
		br.close();

		if (s[0] != 'A') {
			System.out.println("WA");
			return;
		}

		int cnt = 0;
		for (int i = 2; i < s.length - 1; i++) {
			if (s[i] == 'C') {
				cnt++;
			}
		}
		if (cnt != 1) {
			System.out.println("WA");
			return;
		}

		for (int i = 1; i < s.length; i++) {
			if (s[i] != 'C') {
				int x = s[i] - 'a';
				if (x < 0 || 26 <= x) {
					System.out.println("WA");
					return;
				}
			}
		}
		System.out.println("AC");
	}
} Main public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char[] s = br.readLine().toCharArray();
		br.close();

		if (s[0] != 'A') {
			System.out.println("WA");
			return;
		}

		int cnt = 0;
		for (int i = 2; i < s.length - 1; i++) {
			if (s[i] == 'C') {
				cnt++;
			}
		}
		if (cnt != 1) {
			System.out.println("WA");
			return;
		}

		for (int i = 1; i < s.length; i++) {
			if (s[i] != 'C') {
				int x = s[i] - 'a';
				if (x < 0 || 26 <= x) {
					System.out.println("WA");
					return;
				}
			}
		}
		System.out.println("AC");
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char[] s = br.readLine().toCharArray();
		br.close();

		if (s[0] != 'A') {
			System.out.println("WA");
			return;
		}

		int cnt = 0;
		for (int i = 2; i < s.length - 1; i++) {
			if (s[i] == 'C') {
				cnt++;
			}
		}
		if (cnt != 1) {
			System.out.println("WA");
			return;
		}

		for (int i = 1; i < s.length; i++) {
			if (s[i] != 'C') {
				int x = s[i] - 'a';
				if (x < 0 || 26 <= x) {
					System.out.println("WA");
					return;
				}
			}
		}
		System.out.println("AC");
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) char[] s = br.readLine().toCharArray(); s br.readLine().toCharArray() br.readLine().toCharArray br.readLine() br.readLine br br.close() br.close br if (s[0] != 'A') {
			System.out.println("WA");
			return;
		} s[0] != 'A' s[0] s 0 'A' {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; int cnt = 0; cnt 0 for (int i = 2; i < s.length - 1; i++) {
			if (s[i] == 'C') {
				cnt++;
			}
		} int i = 2; int i = 2; i 2 i < s.length - 1 i s.length - 1 s.length s s.length 1 i++ i++ i {
			if (s[i] == 'C') {
				cnt++;
			}
		} {
			if (s[i] == 'C') {
				cnt++;
			}
		} if (s[i] == 'C') {
				cnt++;
			} s[i] == 'C' s[i] s i 'C' {
				cnt++;
			} cnt++ cnt if (cnt != 1) {
			System.out.println("WA");
			return;
		} cnt != 1 cnt 1 {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; for (int i = 1; i < s.length; i++) {
			if (s[i] != 'C') {
				int x = s[i] - 'a';
				if (x < 0 || 26 <= x) {
					System.out.println("WA");
					return;
				}
			}
		} int i = 1; int i = 1; i 1 i < s.length i s.length s s.length i++ i++ i {
			if (s[i] != 'C') {
				int x = s[i] - 'a';
				if (x < 0 || 26 <= x) {
					System.out.println("WA");
					return;
				}
			}
		} {
			if (s[i] != 'C') {
				int x = s[i] - 'a';
				if (x < 0 || 26 <= x) {
					System.out.println("WA");
					return;
				}
			}
		} if (s[i] != 'C') {
				int x = s[i] - 'a';
				if (x < 0 || 26 <= x) {
					System.out.println("WA");
					return;
				}
			} s[i] != 'C' s[i] s i 'C' {
				int x = s[i] - 'a';
				if (x < 0 || 26 <= x) {
					System.out.println("WA");
					return;
				}
			} int x = s[i] - 'a'; x s[i] - 'a' s[i] s i 'a' if (x < 0 || 26 <= x) {
					System.out.println("WA");
					return;
				} x < 0 || 26 <= x x < 0 x 0 26 <= x 26 x {
					System.out.println("WA");
					return;
				} System.out.println("WA") System.out.println System.out System System.out "WA" return; System.out.println("AC") System.out.println System.out System System.out "AC" String[] args args public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char[] s = br.readLine().toCharArray();
		br.close();

		if (s[0] != 'A') {
			System.out.println("WA");
			return;
		}

		int cnt = 0;
		for (int i = 2; i < s.length - 1; i++) {
			if (s[i] == 'C') {
				cnt++;
			}
		}
		if (cnt != 1) {
			System.out.println("WA");
			return;
		}

		for (int i = 1; i < s.length; i++) {
			if (s[i] != 'C') {
				int x = s[i] - 'a';
				if (x < 0 || 26 <= x) {
					System.out.println("WA");
					return;
				}
			}
		}
		System.out.println("AC");
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char[] s = br.readLine().toCharArray();
		br.close();

		if (s[0] != 'A') {
			System.out.println("WA");
			return;
		}

		int cnt = 0;
		for (int i = 2; i < s.length - 1; i++) {
			if (s[i] == 'C') {
				cnt++;
			}
		}
		if (cnt != 1) {
			System.out.println("WA");
			return;
		}

		for (int i = 1; i < s.length; i++) {
			if (s[i] != 'C') {
				int x = s[i] - 'a';
				if (x < 0 || 26 <= x) {
					System.out.println("WA");
					return;
				}
			}
		}
		System.out.println("AC");
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char[] s = br.readLine().toCharArray();
		br.close();

		if (s[0] != 'A') {
			System.out.println("WA");
			return;
		}

		int cnt = 0;
		for (int i = 2; i < s.length - 1; i++) {
			if (s[i] == 'C') {
				cnt++;
			}
		}
		if (cnt != 1) {
			System.out.println("WA");
			return;
		}

		for (int i = 1; i < s.length; i++) {
			if (s[i] != 'C') {
				int x = s[i] - 'a';
				if (x < 0 || 26 <= x) {
					System.out.println("WA");
					return;
				}
			}
		}
		System.out.println("AC");
	}
}
