import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextLine();
		scanner.close();

		int count = 0;
		for (int n = 0; n < S.length(); n++) {
			String c = S.substring(n, n + 1);

			if (n == 0) {
				if (!c.equals("A")) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (n == 1 || n == S.length() - 1) {
				if (!c.equals("A") && Character.isUpperCase(S.charAt(n))) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (c.equals("C") && count == 0) {
				count++;
				continue;
			}

			if (Character.isUpperCase(S.charAt(n))) {
				System.out.println("WA");
				return;
			}
		}
		if (count == 0) {
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextLine();
		scanner.close();

		int count = 0;
		for (int n = 0; n < S.length(); n++) {
			String c = S.substring(n, n + 1);

			if (n == 0) {
				if (!c.equals("A")) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (n == 1 || n == S.length() - 1) {
				if (!c.equals("A") && Character.isUpperCase(S.charAt(n))) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (c.equals("C") && count == 0) {
				count++;
				continue;
			}

			if (Character.isUpperCase(S.charAt(n))) {
				System.out.println("WA");
				return;
			}
		}
		if (count == 0) {
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextLine();
		scanner.close();

		int count = 0;
		for (int n = 0; n < S.length(); n++) {
			String c = S.substring(n, n + 1);

			if (n == 0) {
				if (!c.equals("A")) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (n == 1 || n == S.length() - 1) {
				if (!c.equals("A") && Character.isUpperCase(S.charAt(n))) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (c.equals("C") && count == 0) {
				count++;
				continue;
			}

			if (Character.isUpperCase(S.charAt(n))) {
				System.out.println("WA");
				return;
			}
		}
		if (count == 0) {
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	} main {
		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextLine();
		scanner.close();

		int count = 0;
		for (int n = 0; n < S.length(); n++) {
			String c = S.substring(n, n + 1);

			if (n == 0) {
				if (!c.equals("A")) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (n == 1 || n == S.length() - 1) {
				if (!c.equals("A") && Character.isUpperCase(S.charAt(n))) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (c.equals("C") && count == 0) {
				count++;
				continue;
			}

			if (Character.isUpperCase(S.charAt(n))) {
				System.out.println("WA");
				return;
			}
		}
		if (count == 0) {
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String S = scanner.nextLine(); S scanner.nextLine() scanner.nextLine scanner scanner.close() scanner.close scanner int count = 0; count 0 for (int n = 0; n < S.length(); n++) {
			String c = S.substring(n, n + 1);

			if (n == 0) {
				if (!c.equals("A")) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (n == 1 || n == S.length() - 1) {
				if (!c.equals("A") && Character.isUpperCase(S.charAt(n))) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (c.equals("C") && count == 0) {
				count++;
				continue;
			}

			if (Character.isUpperCase(S.charAt(n))) {
				System.out.println("WA");
				return;
			}
		} int n = 0; int n = 0; n 0 n < S.length() n S.length() S.length S n++ n++ n {
			String c = S.substring(n, n + 1);

			if (n == 0) {
				if (!c.equals("A")) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (n == 1 || n == S.length() - 1) {
				if (!c.equals("A") && Character.isUpperCase(S.charAt(n))) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (c.equals("C") && count == 0) {
				count++;
				continue;
			}

			if (Character.isUpperCase(S.charAt(n))) {
				System.out.println("WA");
				return;
			}
		} {
			String c = S.substring(n, n + 1);

			if (n == 0) {
				if (!c.equals("A")) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (n == 1 || n == S.length() - 1) {
				if (!c.equals("A") && Character.isUpperCase(S.charAt(n))) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (c.equals("C") && count == 0) {
				count++;
				continue;
			}

			if (Character.isUpperCase(S.charAt(n))) {
				System.out.println("WA");
				return;
			}
		} String c = S.substring(n, n + 1); c S.substring(n, n + 1) S.substring S n n + 1 n 1 if (n == 0) {
				if (!c.equals("A")) {
					System.out.println("WA");
					return;
				}
				continue;
			} n == 0 n 0 {
				if (!c.equals("A")) {
					System.out.println("WA");
					return;
				}
				continue;
			} if (!c.equals("A")) {
					System.out.println("WA");
					return;
				} !c.equals("A") c.equals("A") c.equals c "A" {
					System.out.println("WA");
					return;
				} System.out.println("WA") System.out.println System.out System System.out "WA" return; continue; if (n == 1 || n == S.length() - 1) {
				if (!c.equals("A") && Character.isUpperCase(S.charAt(n))) {
					System.out.println("WA");
					return;
				}
				continue;
			} n == 1 || n == S.length() - 1 n == 1 n 1 n == S.length() - 1 n S.length() - 1 S.length() S.length S 1 {
				if (!c.equals("A") && Character.isUpperCase(S.charAt(n))) {
					System.out.println("WA");
					return;
				}
				continue;
			} if (!c.equals("A") && Character.isUpperCase(S.charAt(n))) {
					System.out.println("WA");
					return;
				} !c.equals("A") && Character.isUpperCase(S.charAt(n)) !c.equals("A") c.equals("A") c.equals c "A" Character.isUpperCase(S.charAt(n)) Character.isUpperCase Character S.charAt(n) S.charAt S n {
					System.out.println("WA");
					return;
				} System.out.println("WA") System.out.println System.out System System.out "WA" return; continue; if (c.equals("C") && count == 0) {
				count++;
				continue;
			} c.equals("C") && count == 0 c.equals("C") c.equals c "C" count == 0 count 0 {
				count++;
				continue;
			} count++ count continue; if (Character.isUpperCase(S.charAt(n))) {
				System.out.println("WA");
				return;
			} Character.isUpperCase(S.charAt(n)) Character.isUpperCase Character S.charAt(n) S.charAt S n {
				System.out.println("WA");
				return;
			} System.out.println("WA") System.out.println System.out System System.out "WA" return; if (count == 0) {
			System.out.println("WA");
			return;
		} count == 0 count 0 {
			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) {
		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextLine();
		scanner.close();

		int count = 0;
		for (int n = 0; n < S.length(); n++) {
			String c = S.substring(n, n + 1);

			if (n == 0) {
				if (!c.equals("A")) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (n == 1 || n == S.length() - 1) {
				if (!c.equals("A") && Character.isUpperCase(S.charAt(n))) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (c.equals("C") && count == 0) {
				count++;
				continue;
			}

			if (Character.isUpperCase(S.charAt(n))) {
				System.out.println("WA");
				return;
			}
		}
		if (count == 0) {
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextLine();
		scanner.close();

		int count = 0;
		for (int n = 0; n < S.length(); n++) {
			String c = S.substring(n, n + 1);

			if (n == 0) {
				if (!c.equals("A")) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (n == 1 || n == S.length() - 1) {
				if (!c.equals("A") && Character.isUpperCase(S.charAt(n))) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (c.equals("C") && count == 0) {
				count++;
				continue;
			}

			if (Character.isUpperCase(S.charAt(n))) {
				System.out.println("WA");
				return;
			}
		}
		if (count == 0) {
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String S = scanner.nextLine();
		scanner.close();

		int count = 0;
		for (int n = 0; n < S.length(); n++) {
			String c = S.substring(n, n + 1);

			if (n == 0) {
				if (!c.equals("A")) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (n == 1 || n == S.length() - 1) {
				if (!c.equals("A") && Character.isUpperCase(S.charAt(n))) {
					System.out.println("WA");
					return;
				}
				continue;
			}

			if (c.equals("C") && count == 0) {
				count++;
				continue;
			}

			if (Character.isUpperCase(S.charAt(n))) {
				System.out.println("WA");
				return;
			}
		}
		if (count == 0) {
			System.out.println("WA");
			return;
		}
		System.out.println("AC");
	}
}
