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");
    }

} import java.util.Scanner; Scanner java.util 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");
    }

} 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;
    } containsC {
        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;
    } String[] str = s.split(""); str s.split("") s.split s "" int cCount = 0; cCount 0 for (int i = 2; i < str.length - 1; i++) {
            if ("C".equals(str[i])) {
                cCount++;
            }
        } int i = 2; int i = 2; i 2 i < str.length - 1 i str.length - 1 str.length str str.length 1 i++ i++ i {
            if ("C".equals(str[i])) {
                cCount++;
            }
        } {
            if ("C".equals(str[i])) {
                cCount++;
            }
        } if ("C".equals(str[i])) {
                cCount++;
            } "C".equals(str[i]) "C".equals "C" str[i] str i {
                cCount++;
            } cCount++ cCount return cCount == 1; cCount == 1 cCount 1 String s s 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;
    } isLowerCaseWoAAndC {
        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;
    } String[] str = s.split(""); str s.split("") s.split s "" for (int i = 1; i < str.length; i++) {
            if ("C".equals(str[i])) {
                continue;
            }
            if (str[i].equals(str[i].toUpperCase())) {
                return false;
            }
        } int i = 1; int i = 1; i 1 i < str.length i str.length str str.length i++ i++ i {
            if ("C".equals(str[i])) {
                continue;
            }
            if (str[i].equals(str[i].toUpperCase())) {
                return false;
            }
        } {
            if ("C".equals(str[i])) {
                continue;
            }
            if (str[i].equals(str[i].toUpperCase())) {
                return false;
            }
        } if ("C".equals(str[i])) {
                continue;
            } "C".equals(str[i]) "C".equals "C" str[i] str i {
                continue;
            } continue; if (str[i].equals(str[i].toUpperCase())) {
                return false;
            } str[i].equals(str[i].toUpperCase()) str[i].equals str[i] str i str[i].toUpperCase() str[i].toUpperCase str[i] str i {
                return false;
            } return false; false return true; true String s s 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");
    } main {
        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");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc if ("A".equals(s.substring(0, 1))
                && containsC(s)
                && isLowerCaseWoAAndC(s)) {
            System.out.println("AC");
            return;
        } "A".equals(s.substring(0, 1))
                && containsC(s)
                && isLowerCaseWoAAndC(s) "A".equals(s.substring(0, 1))
                && containsC(s)
                && isLowerCaseWoAAndC(s) "A".equals(s.substring(0, 1)) "A".equals "A" s.substring(0, 1) s.substring s 0 1 containsC(s) containsC s isLowerCaseWoAAndC(s) isLowerCaseWoAAndC s {
            System.out.println("AC");
            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 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");
    }

} 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");
    }

} Main
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");
    }

}
