import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String a = sc.next();
		boolean ans = true;
		char c[] = a.toCharArray();
		int n = a.length();
		if (c[0] != 'A') {
			ans = false;
		}
		int cc = 0;
		for (int i = 2; i <= n - 2; i++) {
			if (c[i] == 'C') {
				cc++;
			}

		}

		if (cc != 1) {
			ans = false;
		}

		for (int i = 0; i <= n - 1; i++) {
			if (c[i] == 'B' || c[i] == 'D' || c[i] == 'E' || c[i] == 'F'
					|| c[i] == 'G' || c[i] == 'H' || c[i] == 'I' || c[i] == 'J'
					|| c[i] == 'K' || c[i] == 'L' || c[i] == 'N' || c[i] == 'M'
					|| c[i] == 'O' || c[i] == 'P' || c[i] == 'Q' || c[i] == 'R'
					|| c[i] == 'S' || c[i] == 'T' || c[i] == 'U' || c[i] == 'V'
					|| c[i] == 'W' || c[i] == 'X' || c[i] == 'Y' || c[i] == 'Z') {
				ans = false;
			}

		}
		if(ans){
			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