import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
		String s = sc.next();
		String ans = "AC";
		int cnt = 0;

		if (!s.startsWith("A")) {
			ans = "WA";
		} else {
			for (int i = 1; i < s.length(); i++) {
				if (i == 1) {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					}
				} else if (i > 1 && i < s.length() - 1) {
					if (s.substring(i, i + 1).equals("C")) {
							cnt++;
					}
				} else {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					} else if (cnt != 1) {
						ans = "WA";
						break;
					}
				}
			}
		}
		System.out.println(ans);

		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
		String s = sc.next();
		String ans = "AC";
		int cnt = 0;

		if (!s.startsWith("A")) {
			ans = "WA";
		} else {
			for (int i = 1; i < s.length(); i++) {
				if (i == 1) {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					}
				} else if (i > 1 && i < s.length() - 1) {
					if (s.substring(i, i + 1).equals("C")) {
							cnt++;
					}
				} else {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					} else if (cnt != 1) {
						ans = "WA";
						break;
					}
				}
			}
		}
		System.out.println(ans);

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
		String s = sc.next();
		String ans = "AC";
		int cnt = 0;

		if (!s.startsWith("A")) {
			ans = "WA";
		} else {
			for (int i = 1; i < s.length(); i++) {
				if (i == 1) {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					}
				} else if (i > 1 && i < s.length() - 1) {
					if (s.substring(i, i + 1).equals("C")) {
							cnt++;
					}
				} else {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					} else if (cnt != 1) {
						ans = "WA";
						break;
					}
				}
			}
		}
		System.out.println(ans);

		sc.close();
	} main {
		Scanner sc = new Scanner((System.in));
		String s = sc.next();
		String ans = "AC";
		int cnt = 0;

		if (!s.startsWith("A")) {
			ans = "WA";
		} else {
			for (int i = 1; i < s.length(); i++) {
				if (i == 1) {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					}
				} else if (i > 1 && i < s.length() - 1) {
					if (s.substring(i, i + 1).equals("C")) {
							cnt++;
					}
				} else {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					} else if (cnt != 1) {
						ans = "WA";
						break;
					}
				}
			}
		}
		System.out.println(ans);

		sc.close();
	} Scanner sc = new Scanner((System.in)); sc new Scanner((System.in)) String s = sc.next(); s sc.next() sc.next sc String ans = "AC"; ans "AC" int cnt = 0; cnt 0 if (!s.startsWith("A")) {
			ans = "WA";
		} else {
			for (int i = 1; i < s.length(); i++) {
				if (i == 1) {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					}
				} else if (i > 1 && i < s.length() - 1) {
					if (s.substring(i, i + 1).equals("C")) {
							cnt++;
					}
				} else {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					} else if (cnt != 1) {
						ans = "WA";
						break;
					}
				}
			}
		} !s.startsWith("A") s.startsWith("A") s.startsWith s "A" {
			ans = "WA";
		} ans = "WA" ans "WA" {
			for (int i = 1; i < s.length(); i++) {
				if (i == 1) {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					}
				} else if (i > 1 && i < s.length() - 1) {
					if (s.substring(i, i + 1).equals("C")) {
							cnt++;
					}
				} else {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					} else if (cnt != 1) {
						ans = "WA";
						break;
					}
				}
			}
		} for (int i = 1; i < s.length(); i++) {
				if (i == 1) {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					}
				} else if (i > 1 && i < s.length() - 1) {
					if (s.substring(i, i + 1).equals("C")) {
							cnt++;
					}
				} else {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					} else if (cnt != 1) {
						ans = "WA";
						break;
					}
				}
			} int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
				if (i == 1) {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					}
				} else if (i > 1 && i < s.length() - 1) {
					if (s.substring(i, i + 1).equals("C")) {
							cnt++;
					}
				} else {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					} else if (cnt != 1) {
						ans = "WA";
						break;
					}
				}
			} {
				if (i == 1) {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					}
				} else if (i > 1 && i < s.length() - 1) {
					if (s.substring(i, i + 1).equals("C")) {
							cnt++;
					}
				} else {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					} else if (cnt != 1) {
						ans = "WA";
						break;
					}
				}
			} if (i == 1) {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					}
				} else if (i > 1 && i < s.length() - 1) {
					if (s.substring(i, i + 1).equals("C")) {
							cnt++;
					}
				} else {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					} else if (cnt != 1) {
						ans = "WA";
						break;
					}
				} i == 1 i 1 {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					}
				} if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					} Character.isUpperCase(s.substring(i).charAt(0)) Character.isUpperCase Character s.substring(i).charAt(0) s.substring(i).charAt s.substring(i) s.substring s i 0 {
						ans = "WA";
						break;
					} ans = "WA" ans "WA" break; if (i > 1 && i < s.length() - 1) {
					if (s.substring(i, i + 1).equals("C")) {
							cnt++;
					}
				} else {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					} else if (cnt != 1) {
						ans = "WA";
						break;
					}
				} i > 1 && i < s.length() - 1 i > 1 i 1 i < s.length() - 1 i s.length() - 1 s.length() s.length s 1 {
					if (s.substring(i, i + 1).equals("C")) {
							cnt++;
					}
				} if (s.substring(i, i + 1).equals("C")) {
							cnt++;
					} s.substring(i, i + 1).equals("C") s.substring(i, i + 1).equals s.substring(i, i + 1) s.substring s i i + 1 i 1 "C" {
							cnt++;
					} cnt++ cnt {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					} else if (cnt != 1) {
						ans = "WA";
						break;
					}
				} if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					} else if (cnt != 1) {
						ans = "WA";
						break;
					} Character.isUpperCase(s.substring(i).charAt(0)) Character.isUpperCase Character s.substring(i).charAt(0) s.substring(i).charAt s.substring(i) s.substring s i 0 {
						ans = "WA";
						break;
					} ans = "WA" ans "WA" break; if (cnt != 1) {
						ans = "WA";
						break;
					} cnt != 1 cnt 1 {
						ans = "WA";
						break;
					} ans = "WA" ans "WA" break; System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
		String s = sc.next();
		String ans = "AC";
		int cnt = 0;

		if (!s.startsWith("A")) {
			ans = "WA";
		} else {
			for (int i = 1; i < s.length(); i++) {
				if (i == 1) {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					}
				} else if (i > 1 && i < s.length() - 1) {
					if (s.substring(i, i + 1).equals("C")) {
							cnt++;
					}
				} else {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					} else if (cnt != 1) {
						ans = "WA";
						break;
					}
				}
			}
		}
		System.out.println(ans);

		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
		String s = sc.next();
		String ans = "AC";
		int cnt = 0;

		if (!s.startsWith("A")) {
			ans = "WA";
		} else {
			for (int i = 1; i < s.length(); i++) {
				if (i == 1) {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					}
				} else if (i > 1 && i < s.length() - 1) {
					if (s.substring(i, i + 1).equals("C")) {
							cnt++;
					}
				} else {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					} else if (cnt != 1) {
						ans = "WA";
						break;
					}
				}
			}
		}
		System.out.println(ans);

		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
		String s = sc.next();
		String ans = "AC";
		int cnt = 0;

		if (!s.startsWith("A")) {
			ans = "WA";
		} else {
			for (int i = 1; i < s.length(); i++) {
				if (i == 1) {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					}
				} else if (i > 1 && i < s.length() - 1) {
					if (s.substring(i, i + 1).equals("C")) {
							cnt++;
					}
				} else {
					if (Character.isUpperCase(s.substring(i).charAt(0))) {
						ans = "WA";
						break;
					} else if (cnt != 1) {
						ans = "WA";
						break;
					}
				}
			}
		}
		System.out.println(ans);

		sc.close();
	}
}
