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 c = 0;
		for (int i = 2; i < S.length() - 1; i++) {
			if (S.substring(i, i + 1).equals("C")) {
				c++;
			} else if (Character.isUpperCase(S.charAt(i))) {
				c = 2;
			}
		}

		if (Character.isUpperCase(S.charAt(1)) || Character.isUpperCase(S.charAt(S.length() - 1))
				|| !S.substring(0, 1).equals("A")
				|| S.substring(1, 2).equals("C")
				|| S.substring(S.length() - 1, S.length()).equals("C") || c != 1) {
			ans = "WA";
		}

		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 c = 0;
		for (int i = 2; i < S.length() - 1; i++) {
			if (S.substring(i, i + 1).equals("C")) {
				c++;
			} else if (Character.isUpperCase(S.charAt(i))) {
				c = 2;
			}
		}

		if (Character.isUpperCase(S.charAt(1)) || Character.isUpperCase(S.charAt(S.length() - 1))
				|| !S.substring(0, 1).equals("A")
				|| S.substring(1, 2).equals("C")
				|| S.substring(S.length() - 1, S.length()).equals("C") || c != 1) {
			ans = "WA";
		}

		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 c = 0;
		for (int i = 2; i < S.length() - 1; i++) {
			if (S.substring(i, i + 1).equals("C")) {
				c++;
			} else if (Character.isUpperCase(S.charAt(i))) {
				c = 2;
			}
		}

		if (Character.isUpperCase(S.charAt(1)) || Character.isUpperCase(S.charAt(S.length() - 1))
				|| !S.substring(0, 1).equals("A")
				|| S.substring(1, 2).equals("C")
				|| S.substring(S.length() - 1, S.length()).equals("C") || c != 1) {
			ans = "WA";
		}

		System.out.println(ans);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		String S = sc.next();

		String ans = "AC";

		int c = 0;
		for (int i = 2; i < S.length() - 1; i++) {
			if (S.substring(i, i + 1).equals("C")) {
				c++;
			} else if (Character.isUpperCase(S.charAt(i))) {
				c = 2;
			}
		}

		if (Character.isUpperCase(S.charAt(1)) || Character.isUpperCase(S.charAt(S.length() - 1))
				|| !S.substring(0, 1).equals("A")
				|| S.substring(1, 2).equals("C")
				|| S.substring(S.length() - 1, S.length()).equals("C") || c != 1) {
			ans = "WA";
		}

		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 c = 0; c 0 for (int i = 2; i < S.length() - 1; i++) {
			if (S.substring(i, i + 1).equals("C")) {
				c++;
			} else if (Character.isUpperCase(S.charAt(i))) {
				c = 2;
			}
		} int i = 2; int i = 2; i 2 i < S.length() - 1 i S.length() - 1 S.length() S.length S 1 i++ i++ i {
			if (S.substring(i, i + 1).equals("C")) {
				c++;
			} else if (Character.isUpperCase(S.charAt(i))) {
				c = 2;
			}
		} {
			if (S.substring(i, i + 1).equals("C")) {
				c++;
			} else if (Character.isUpperCase(S.charAt(i))) {
				c = 2;
			}
		} if (S.substring(i, i + 1).equals("C")) {
				c++;
			} else if (Character.isUpperCase(S.charAt(i))) {
				c = 2;
			} 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" {
				c++;
			} c++ c if (Character.isUpperCase(S.charAt(i))) {
				c = 2;
			} Character.isUpperCase(S.charAt(i)) Character.isUpperCase Character S.charAt(i) S.charAt S i {
				c = 2;
			} c = 2 c 2 if (Character.isUpperCase(S.charAt(1)) || Character.isUpperCase(S.charAt(S.length() - 1))
				|| !S.substring(0, 1).equals("A")
				|| S.substring(1, 2).equals("C")
				|| S.substring(S.length() - 1, S.length()).equals("C") || c != 1) {
			ans = "WA";
		} Character.isUpperCase(S.charAt(1)) || Character.isUpperCase(S.charAt(S.length() - 1))
				|| !S.substring(0, 1).equals("A")
				|| S.substring(1, 2).equals("C")
				|| S.substring(S.length() - 1, S.length()).equals("C") || c != 1 S.substring(S.length() - 1, S.length()).equals("C") S.substring(1, 2).equals("C") !S.substring(0, 1).equals("A") Character.isUpperCase(S.charAt(1)) || Character.isUpperCase(S.charAt(S.length() - 1))
				|| !S.substring(0, 1).equals("A")
				|| S.substring(1, 2).equals("C")
				|| S.substring(S.length() - 1, S.length()).equals("C") || c != 1 Character.isUpperCase(S.charAt(1)) Character.isUpperCase Character S.charAt(1) S.charAt S 1 Character.isUpperCase(S.charAt(S.length() - 1)) Character.isUpperCase Character S.charAt(S.length() - 1) S.charAt S S.length() - 1 S.length() S.length S 1 !S.substring(0, 1).equals("A") S.substring(0, 1).equals("A") S.substring(0, 1).equals S.substring(0, 1) S.substring S 0 1 "A" S.substring(1, 2).equals("C") S.substring(1, 2).equals S.substring(1, 2) S.substring S 1 2 "C" S.substring(S.length() - 1, S.length()).equals("C") S.substring(S.length() - 1, S.length()).equals S.substring(S.length() - 1, S.length()) S.substring S S.length() - 1 S.length() S.length S 1 S.length() S.length S "C" c != 1 c 1 {
			ans = "WA";
		} ans = "WA" ans "WA" 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 c = 0;
		for (int i = 2; i < S.length() - 1; i++) {
			if (S.substring(i, i + 1).equals("C")) {
				c++;
			} else if (Character.isUpperCase(S.charAt(i))) {
				c = 2;
			}
		}

		if (Character.isUpperCase(S.charAt(1)) || Character.isUpperCase(S.charAt(S.length() - 1))
				|| !S.substring(0, 1).equals("A")
				|| S.substring(1, 2).equals("C")
				|| S.substring(S.length() - 1, S.length()).equals("C") || c != 1) {
			ans = "WA";
		}

		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 c = 0;
		for (int i = 2; i < S.length() - 1; i++) {
			if (S.substring(i, i + 1).equals("C")) {
				c++;
			} else if (Character.isUpperCase(S.charAt(i))) {
				c = 2;
			}
		}

		if (Character.isUpperCase(S.charAt(1)) || Character.isUpperCase(S.charAt(S.length() - 1))
				|| !S.substring(0, 1).equals("A")
				|| S.substring(1, 2).equals("C")
				|| S.substring(S.length() - 1, S.length()).equals("C") || c != 1) {
			ans = "WA";
		}

		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 c = 0;
		for (int i = 2; i < S.length() - 1; i++) {
			if (S.substring(i, i + 1).equals("C")) {
				c++;
			} else if (Character.isUpperCase(S.charAt(i))) {
				c = 2;
			}
		}

		if (Character.isUpperCase(S.charAt(1)) || Character.isUpperCase(S.charAt(S.length() - 1))
				|| !S.substring(0, 1).equals("A")
				|| S.substring(1, 2).equals("C")
				|| S.substring(S.length() - 1, S.length()).equals("C") || c != 1) {
			ans = "WA";
		}

		System.out.println(ans);
		sc.close();
	}

}
