import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        String s;
        try (Scanner cin = new Scanner(System.in)) {
            s = cin.next();
        }
        int cindex = s.indexOf('C');
        if (s.startsWith("A") && cindex > 1 && cindex < s.length() - 1) {
            for (int i = 1; i < s.length(); i++) {
                if (i != cindex && !Character.isLowerCase(s.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            }
            System.out.println("AC");
            return;
        }

        System.out.println("WA");
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        String s;
        try (Scanner cin = new Scanner(System.in)) {
            s = cin.next();
        }
        int cindex = s.indexOf('C');
        if (s.startsWith("A") && cindex > 1 && cindex < s.length() - 1) {
            for (int i = 1; i < s.length(); i++) {
                if (i != cindex && !Character.isLowerCase(s.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            }
            System.out.println("AC");
            return;
        }

        System.out.println("WA");
    }
} Main public static void main(String[] args) {
        String s;
        try (Scanner cin = new Scanner(System.in)) {
            s = cin.next();
        }
        int cindex = s.indexOf('C');
        if (s.startsWith("A") && cindex > 1 && cindex < s.length() - 1) {
            for (int i = 1; i < s.length(); i++) {
                if (i != cindex && !Character.isLowerCase(s.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            }
            System.out.println("AC");
            return;
        }

        System.out.println("WA");
    } main {
        String s;
        try (Scanner cin = new Scanner(System.in)) {
            s = cin.next();
        }
        int cindex = s.indexOf('C');
        if (s.startsWith("A") && cindex > 1 && cindex < s.length() - 1) {
            for (int i = 1; i < s.length(); i++) {
                if (i != cindex && !Character.isLowerCase(s.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            }
            System.out.println("AC");
            return;
        }

        System.out.println("WA");
    } String s; s try (Scanner cin = new Scanner(System.in)) {
            s = cin.next();
        } {
            s = cin.next();
        } Scanner cin = new Scanner(System.in) Scanner cin = new Scanner(System.in) new Scanner(System.in) s = cin.next() s cin.next() cin.next cin int cindex = s.indexOf('C'); cindex s.indexOf('C') s.indexOf s 'C' if (s.startsWith("A") && cindex > 1 && cindex < s.length() - 1) {
            for (int i = 1; i < s.length(); i++) {
                if (i != cindex && !Character.isLowerCase(s.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            }
            System.out.println("AC");
            return;
        } s.startsWith("A") && cindex > 1 && cindex < s.length() - 1 s.startsWith("A") && cindex > 1 && cindex < s.length() - 1 s.startsWith("A") s.startsWith s "A" cindex > 1 cindex 1 cindex < s.length() - 1 cindex s.length() - 1 s.length() s.length s 1 {
            for (int i = 1; i < s.length(); i++) {
                if (i != cindex && !Character.isLowerCase(s.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            }
            System.out.println("AC");
            return;
        } for (int i = 1; i < s.length(); i++) {
                if (i != cindex && !Character.isLowerCase(s.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            } int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
                if (i != cindex && !Character.isLowerCase(s.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            } {
                if (i != cindex && !Character.isLowerCase(s.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            } if (i != cindex && !Character.isLowerCase(s.charAt(i))) {
                    System.out.println("WA");
                    return;
                } i != cindex && !Character.isLowerCase(s.charAt(i)) i != cindex i cindex !Character.isLowerCase(s.charAt(i)) Character.isLowerCase(s.charAt(i)) Character.isLowerCase Character s.charAt(i) s.charAt s i {
                    System.out.println("WA");
                    return;
                } System.out.println("WA") System.out.println System.out System System.out "WA" return; System.out.println("AC") System.out.println System.out System System.out "AC" return; System.out.println("WA") System.out.println System.out System System.out "WA" String[] args args
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        String s;
        try (Scanner cin = new Scanner(System.in)) {
            s = cin.next();
        }
        int cindex = s.indexOf('C');
        if (s.startsWith("A") && cindex > 1 && cindex < s.length() - 1) {
            for (int i = 1; i < s.length(); i++) {
                if (i != cindex && !Character.isLowerCase(s.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            }
            System.out.println("AC");
            return;
        }

        System.out.println("WA");
    }
}