import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner scannerS = new Scanner(System.in);
		String s = scannerS.nextLine();

		char s0 = s.charAt(0);
		String ss = s.substring(2, s.length() - 1);
		char sl[] = s.toCharArray();
		int lower = 0;


		for (int i = 0; i < s.length(); i++) {
			if (sl[i] <= 'z' && sl[i] >= 'a')
				lower++;
		}
		//      System.out.println(lower);

		//	    System.out.println(ss);


		int count = 0;
		for (int i = 0; i < ss.length(); i++) {
			if (ss.charAt(i) == 'C')
				count++;
		}

		//	    System.out.println(count);

		if (s0 == 'A' && count == 1 && lower==s.length()-2) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	}

}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz