import java.util.Scanner;

public class Main {

    private static boolean containsC(String s) {
        String[] str = s.split("");
        int cCount = 0;
        for (int i = 2; i < str.length - 1; i++) {
            if ("C".equals(str[i])) {
                cCount++;
            }
        }
        return cCount == 1;
    }

    private static boolean isLowerCaseWoAAndC(String s) {
        String[] str = s.split("");
        for (int i = 1; i < str.length; i++) {
            if ("C".equals(str[i])) {
                continue;
            }
            if (str[i].equals(str[i].toUpperCase())) {
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if ("A".equals(s.substring(0, 1))
                && containsC(s)
                && isLowerCaseWoAAndC(s)) {
            System.out.println("AC");
            return;
        }
        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