import java.util.Scanner;

public class Main {

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

		boolean match = true;
		String s;
		match = match && S.substring(0, 1).equals("A");
		int cntC = 0;
		for (int i = 1; i < S.length(); i++) {
			s = S.substring(i, i + 1);

			if (i >= 2 && i < S.length() - 1) {
				if (s.equals("C")) {
					cntC++;
				}
			}
			if (!s.equals("C")) {
				match = match && s.matches("[a-z]");
			}
		}
		match = match && cntC == 1;
		System.out.println(match ? "AC" : "WA");
	}

} 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.nextLine();

		boolean match = true;
		String s;
		match = match && S.substring(0, 1).equals("A");
		int cntC = 0;
		for (int i = 1; i < S.length(); i++) {
			s = S.substring(i, i + 1);

			if (i >= 2 && i < S.length() - 1) {
				if (s.equals("C")) {
					cntC++;
				}
			}
			if (!s.equals("C")) {
				match = match && s.matches("[a-z]");
			}
		}
		match = match && cntC == 1;
		System.out.println(match ? "AC" : "WA");
	}

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

		boolean match = true;
		String s;
		match = match && S.substring(0, 1).equals("A");
		int cntC = 0;
		for (int i = 1; i < S.length(); i++) {
			s = S.substring(i, i + 1);

			if (i >= 2 && i < S.length() - 1) {
				if (s.equals("C")) {
					cntC++;
				}
			}
			if (!s.equals("C")) {
				match = match && s.matches("[a-z]");
			}
		}
		match = match && cntC == 1;
		System.out.println(match ? "AC" : "WA");
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();

		boolean match = true;
		String s;
		match = match && S.substring(0, 1).equals("A");
		int cntC = 0;
		for (int i = 1; i < S.length(); i++) {
			s = S.substring(i, i + 1);

			if (i >= 2 && i < S.length() - 1) {
				if (s.equals("C")) {
					cntC++;
				}
			}
			if (!s.equals("C")) {
				match = match && s.matches("[a-z]");
			}
		}
		match = match && cntC == 1;
		System.out.println(match ? "AC" : "WA");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.nextLine(); S sc.nextLine() sc.nextLine sc boolean match = true; match true String s; s match = match && S.substring(0, 1).equals("A") match match && S.substring(0, 1).equals("A") match S.substring(0, 1).equals("A") S.substring(0, 1).equals S.substring(0, 1) S.substring S 0 1 "A" int cntC = 0; cntC 0 for (int i = 1; i < S.length(); i++) {
			s = S.substring(i, i + 1);

			if (i >= 2 && i < S.length() - 1) {
				if (s.equals("C")) {
					cntC++;
				}
			}
			if (!s.equals("C")) {
				match = match && s.matches("[a-z]");
			}
		} int i = 1; int i = 1; i 1 i < S.length() i S.length() S.length S i++ i++ i {
			s = S.substring(i, i + 1);

			if (i >= 2 && i < S.length() - 1) {
				if (s.equals("C")) {
					cntC++;
				}
			}
			if (!s.equals("C")) {
				match = match && s.matches("[a-z]");
			}
		} {
			s = S.substring(i, i + 1);

			if (i >= 2 && i < S.length() - 1) {
				if (s.equals("C")) {
					cntC++;
				}
			}
			if (!s.equals("C")) {
				match = match && s.matches("[a-z]");
			}
		} s = S.substring(i, i + 1) s S.substring(i, i + 1) S.substring S i i + 1 i 1 if (i >= 2 && i < S.length() - 1) {
				if (s.equals("C")) {
					cntC++;
				}
			} i >= 2 && i < S.length() - 1 i >= 2 i 2 i < S.length() - 1 i S.length() - 1 S.length() S.length S 1 {
				if (s.equals("C")) {
					cntC++;
				}
			} if (s.equals("C")) {
					cntC++;
				} s.equals("C") s.equals s "C" {
					cntC++;
				} cntC++ cntC if (!s.equals("C")) {
				match = match && s.matches("[a-z]");
			} !s.equals("C") s.equals("C") s.equals s "C" {
				match = match && s.matches("[a-z]");
			} match = match && s.matches("[a-z]") match match && s.matches("[a-z]") match s.matches("[a-z]") s.matches s "[a-z]" match = match && cntC == 1 match match && cntC == 1 match cntC == 1 cntC 1 System.out.println(match ? "AC" : "WA") System.out.println System.out System System.out match ? "AC" : "WA" match "AC" "WA" String[] args args public class Main {

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

		boolean match = true;
		String s;
		match = match && S.substring(0, 1).equals("A");
		int cntC = 0;
		for (int i = 1; i < S.length(); i++) {
			s = S.substring(i, i + 1);

			if (i >= 2 && i < S.length() - 1) {
				if (s.equals("C")) {
					cntC++;
				}
			}
			if (!s.equals("C")) {
				match = match && s.matches("[a-z]");
			}
		}
		match = match && cntC == 1;
		System.out.println(match ? "AC" : "WA");
	}

} public class Main {

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

		boolean match = true;
		String s;
		match = match && S.substring(0, 1).equals("A");
		int cntC = 0;
		for (int i = 1; i < S.length(); i++) {
			s = S.substring(i, i + 1);

			if (i >= 2 && i < S.length() - 1) {
				if (s.equals("C")) {
					cntC++;
				}
			}
			if (!s.equals("C")) {
				match = match && s.matches("[a-z]");
			}
		}
		match = match && cntC == 1;
		System.out.println(match ? "AC" : "WA");
	}

} Main
import java.util.Scanner;

public class Main {

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

		boolean match = true;
		String s;
		match = match && S.substring(0, 1).equals("A");
		int cntC = 0;
		for (int i = 1; i < S.length(); i++) {
			s = S.substring(i, i + 1);

			if (i >= 2 && i < S.length() - 1) {
				if (s.equals("C")) {
					cntC++;
				}
			}
			if (!s.equals("C")) {
				match = match && s.matches("[a-z]");
			}
		}
		match = match && cntC == 1;
		System.out.println(match ? "AC" : "WA");
	}

}
