import java.util.Scanner;

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

		int frag = 0;
		if (S.charAt(0) == 'A') {
			for (int i = 2; i < S.length() - 1; i++) {
				if (S.charAt(i) == 'C') {
					frag = 1;
					break;
				}
			}
		}
		int cnt = 0;
		for (int i = 0; i < S.length(); i++) {
			if (Character.isUpperCase(S.charAt(i)))
				cnt++;
		}
		if (cnt != 2)
			frag = 0;

		if (frag == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
		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();

		int frag = 0;
		if (S.charAt(0) == 'A') {
			for (int i = 2; i < S.length() - 1; i++) {
				if (S.charAt(i) == 'C') {
					frag = 1;
					break;
				}
			}
		}
		int cnt = 0;
		for (int i = 0; i < S.length(); i++) {
			if (Character.isUpperCase(S.charAt(i)))
				cnt++;
		}
		if (cnt != 2)
			frag = 0;

		if (frag == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		int frag = 0;
		if (S.charAt(0) == 'A') {
			for (int i = 2; i < S.length() - 1; i++) {
				if (S.charAt(i) == 'C') {
					frag = 1;
					break;
				}
			}
		}
		int cnt = 0;
		for (int i = 0; i < S.length(); i++) {
			if (Character.isUpperCase(S.charAt(i)))
				cnt++;
		}
		if (cnt != 2)
			frag = 0;

		if (frag == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		int frag = 0;
		if (S.charAt(0) == 'A') {
			for (int i = 2; i < S.length() - 1; i++) {
				if (S.charAt(i) == 'C') {
					frag = 1;
					break;
				}
			}
		}
		int cnt = 0;
		for (int i = 0; i < S.length(); i++) {
			if (Character.isUpperCase(S.charAt(i)))
				cnt++;
		}
		if (cnt != 2)
			frag = 0;

		if (frag == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int frag = 0; frag 0 if (S.charAt(0) == 'A') {
			for (int i = 2; i < S.length() - 1; i++) {
				if (S.charAt(i) == 'C') {
					frag = 1;
					break;
				}
			}
		} S.charAt(0) == 'A' S.charAt(0) S.charAt S 0 'A' {
			for (int i = 2; i < S.length() - 1; i++) {
				if (S.charAt(i) == 'C') {
					frag = 1;
					break;
				}
			}
		} for (int i = 2; i < S.length() - 1; i++) {
				if (S.charAt(i) == 'C') {
					frag = 1;
					break;
				}
			} 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.charAt(i) == 'C') {
					frag = 1;
					break;
				}
			} {
				if (S.charAt(i) == 'C') {
					frag = 1;
					break;
				}
			} if (S.charAt(i) == 'C') {
					frag = 1;
					break;
				} S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' {
					frag = 1;
					break;
				} frag = 1 frag 1 break; int cnt = 0; cnt 0 for (int i = 0; i < S.length(); i++) {
			if (Character.isUpperCase(S.charAt(i)))
				cnt++;
		} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
			if (Character.isUpperCase(S.charAt(i)))
				cnt++;
		} {
			if (Character.isUpperCase(S.charAt(i)))
				cnt++;
		} if (Character.isUpperCase(S.charAt(i)))
				cnt++; Character.isUpperCase(S.charAt(i)) Character.isUpperCase Character S.charAt(i) S.charAt S i cnt++ cnt if (cnt != 2)
			frag = 0; cnt != 2 cnt 2 frag = 0 frag 0 if (frag == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		} frag == 1 frag 1 {
			System.out.println("AC");
		} System.out.println("AC") System.out.println System.out System System.out "AC" {
			System.out.println("WA");
		} System.out.println("WA") System.out.println System.out System System.out "WA" 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();

		int frag = 0;
		if (S.charAt(0) == 'A') {
			for (int i = 2; i < S.length() - 1; i++) {
				if (S.charAt(i) == 'C') {
					frag = 1;
					break;
				}
			}
		}
		int cnt = 0;
		for (int i = 0; i < S.length(); i++) {
			if (Character.isUpperCase(S.charAt(i)))
				cnt++;
		}
		if (cnt != 2)
			frag = 0;

		if (frag == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();

		int frag = 0;
		if (S.charAt(0) == 'A') {
			for (int i = 2; i < S.length() - 1; i++) {
				if (S.charAt(i) == 'C') {
					frag = 1;
					break;
				}
			}
		}
		int cnt = 0;
		for (int i = 0; i < S.length(); i++) {
			if (Character.isUpperCase(S.charAt(i)))
				cnt++;
		}
		if (cnt != 2)
			frag = 0;

		if (frag == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
		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();

		int frag = 0;
		if (S.charAt(0) == 'A') {
			for (int i = 2; i < S.length() - 1; i++) {
				if (S.charAt(i) == 'C') {
					frag = 1;
					break;
				}
			}
		}
		int cnt = 0;
		for (int i = 0; i < S.length(); i++) {
			if (Character.isUpperCase(S.charAt(i)))
				cnt++;
		}
		if (cnt != 2)
			frag = 0;

		if (frag == 1) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
		sc.close();
	}
}