import java.io.*;
import java.util.*;


public class Main {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		char[] s = sc.next().toCharArray();

		if (s[0] != 'A') {
			pr.println("WA");
		} else {
			int cnt = 0;
			for (int i = 2; i < s.length - 1; i++) {
				if (s[i] == 'C') {
					cnt++;
				}
			}

			if (cnt != 1) {
				pr.println("WA");
			} else {
				int cp = 0;
				for (char c : s) {
					if (c >= 'A' && c <= 'Z') {
						cp++;
					}
				}
				
				if (cp != 2) {
					pr.println("WA");
				} else {
					pr.println("AC");
				}
			}
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes()));
		pr = new Printer(System.out);

		solve();

//		pr.close();
		pr.flush();
//		sc.close();
	}

	static String INPUT = null;

	private static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}

/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