import java.util.Scanner;

class Main {
    static final Scanner IN = new Scanner(System.in);
    static final String S = IN.next();
    public static void main(String... args) {
        if (S.matches("A[a-z]+C[a-z]+")) {
            puts("AC");
        } else {
            puts("WA");
        }
    }
    static <T> void puts(T arg) { System.out.println(arg);}
} import java.util.Scanner; Scanner java.util class Main {
    static final Scanner IN = new Scanner(System.in);
    static final String S = IN.next();
    public static void main(String... args) {
        if (S.matches("A[a-z]+C[a-z]+")) {
            puts("AC");
        } else {
            puts("WA");
        }
    }
    static <T> void puts(T arg) { System.out.println(arg);}
} Main static final Scanner IN = new Scanner(System.in); IN new Scanner(System.in) static final String S = IN.next(); S IN.next() IN.next IN public static void main(String... args) {
        if (S.matches("A[a-z]+C[a-z]+")) {
            puts("AC");
        } else {
            puts("WA");
        }
    } main {
        if (S.matches("A[a-z]+C[a-z]+")) {
            puts("AC");
        } else {
            puts("WA");
        }
    } if (S.matches("A[a-z]+C[a-z]+")) {
            puts("AC");
        } else {
            puts("WA");
        } S.matches("A[a-z]+C[a-z]+") S.matches S "A[a-z]+C[a-z]+" {
            puts("AC");
        } puts("AC") puts "AC" {
            puts("WA");
        } puts("WA") puts "WA" String... args args static <T> void puts(T arg) { System.out.println(arg);} puts { System.out.println(arg);} System.out.println(arg) System.out.println System.out System System.out arg T arg arg
import java.util.Scanner;

class Main {
    static final Scanner IN = new Scanner(System.in);
    static final String S = IN.next();
    public static void main(String... args) {
        if (S.matches("A[a-z]+C[a-z]+")) {
            puts("AC");
        } else {
            puts("WA");
        }
    }
    static <T> void puts(T arg) { System.out.println(arg);}
}