import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] str;
        int count = 0;
        str = s.split("");
        if (!str[0].equals("A")) {
            System.out.println("WA");
            System.exit(0);
        }
        for (int i = 2; i <= str.length - 2; i++) {
            if (Character.isLowerCase(s.charAt(i))) {
            } else {
                if (str[i].equals("C")) {
                    count++;
                } else {
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        }
        if (Character.isLowerCase(s.charAt(1))) {
        } else {
            System.out.println("WA");
            System.exit(0);
        }
        if (Character.isLowerCase(s.charAt(str.length - 1)) && count == 1) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] str;
        int count = 0;
        str = s.split("");
        if (!str[0].equals("A")) {
            System.out.println("WA");
            System.exit(0);
        }
        for (int i = 2; i <= str.length - 2; i++) {
            if (Character.isLowerCase(s.charAt(i))) {
            } else {
                if (str[i].equals("C")) {
                    count++;
                } else {
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        }
        if (Character.isLowerCase(s.charAt(1))) {
        } else {
            System.out.println("WA");
            System.exit(0);
        }
        if (Character.isLowerCase(s.charAt(str.length - 1)) && count == 1) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] str;
        int count = 0;
        str = s.split("");
        if (!str[0].equals("A")) {
            System.out.println("WA");
            System.exit(0);
        }
        for (int i = 2; i <= str.length - 2; i++) {
            if (Character.isLowerCase(s.charAt(i))) {
            } else {
                if (str[i].equals("C")) {
                    count++;
                } else {
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        }
        if (Character.isLowerCase(s.charAt(1))) {
        } else {
            System.out.println("WA");
            System.exit(0);
        }
        if (Character.isLowerCase(s.charAt(str.length - 1)) && count == 1) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] str;
        int count = 0;
        str = s.split("");
        if (!str[0].equals("A")) {
            System.out.println("WA");
            System.exit(0);
        }
        for (int i = 2; i <= str.length - 2; i++) {
            if (Character.isLowerCase(s.charAt(i))) {
            } else {
                if (str[i].equals("C")) {
                    count++;
                } else {
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        }
        if (Character.isLowerCase(s.charAt(1))) {
        } else {
            System.out.println("WA");
            System.exit(0);
        }
        if (Character.isLowerCase(s.charAt(str.length - 1)) && count == 1) {
            System.out.println("AC");
        } else {
            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 String[] str; str int count = 0; count 0 str = s.split("") str s.split("") s.split s "" if (!str[0].equals("A")) {
            System.out.println("WA");
            System.exit(0);
        } !str[0].equals("A") str[0].equals("A") str[0].equals str[0] str 0 "A" {
            System.out.println("WA");
            System.exit(0);
        } System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 for (int i = 2; i <= str.length - 2; i++) {
            if (Character.isLowerCase(s.charAt(i))) {
            } else {
                if (str[i].equals("C")) {
                    count++;
                } else {
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        } int i = 2; int i = 2; i 2 i <= str.length - 2 i str.length - 2 str.length str str.length 2 i++ i++ i {
            if (Character.isLowerCase(s.charAt(i))) {
            } else {
                if (str[i].equals("C")) {
                    count++;
                } else {
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        } {
            if (Character.isLowerCase(s.charAt(i))) {
            } else {
                if (str[i].equals("C")) {
                    count++;
                } else {
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        } if (Character.isLowerCase(s.charAt(i))) {
            } else {
                if (str[i].equals("C")) {
                    count++;
                } else {
                    System.out.println("WA");
                    System.exit(0);
                }
            } Character.isLowerCase(s.charAt(i)) Character.isLowerCase Character s.charAt(i) s.charAt s i {
            } {
                if (str[i].equals("C")) {
                    count++;
                } else {
                    System.out.println("WA");
                    System.exit(0);
                }
            } if (str[i].equals("C")) {
                    count++;
                } else {
                    System.out.println("WA");
                    System.exit(0);
                } str[i].equals("C") str[i].equals str[i] str i "C" {
                    count++;
                } count++ count {
                    System.out.println("WA");
                    System.exit(0);
                } System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 if (Character.isLowerCase(s.charAt(1))) {
        } else {
            System.out.println("WA");
            System.exit(0);
        } Character.isLowerCase(s.charAt(1)) Character.isLowerCase Character s.charAt(1) s.charAt s 1 {
        } {
            System.out.println("WA");
            System.exit(0);
        } System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 if (Character.isLowerCase(s.charAt(str.length - 1)) && count == 1) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        } Character.isLowerCase(s.charAt(str.length - 1)) && count == 1 Character.isLowerCase(s.charAt(str.length - 1)) Character.isLowerCase Character s.charAt(str.length - 1) s.charAt s str.length - 1 str.length str str.length 1 count == 1 count 1 {
            System.out.println("AC");
        } System.out.println("AC") System.out.println System.out System System.out "AC" {
            System.out.println("WA");
        } System.out.println("WA") System.out.println System.out System System.out "WA" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] str;
        int count = 0;
        str = s.split("");
        if (!str[0].equals("A")) {
            System.out.println("WA");
            System.exit(0);
        }
        for (int i = 2; i <= str.length - 2; i++) {
            if (Character.isLowerCase(s.charAt(i))) {
            } else {
                if (str[i].equals("C")) {
                    count++;
                } else {
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        }
        if (Character.isLowerCase(s.charAt(1))) {
        } else {
            System.out.println("WA");
            System.exit(0);
        }
        if (Character.isLowerCase(s.charAt(str.length - 1)) && count == 1) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] str;
        int count = 0;
        str = s.split("");
        if (!str[0].equals("A")) {
            System.out.println("WA");
            System.exit(0);
        }
        for (int i = 2; i <= str.length - 2; i++) {
            if (Character.isLowerCase(s.charAt(i))) {
            } else {
                if (str[i].equals("C")) {
                    count++;
                } else {
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        }
        if (Character.isLowerCase(s.charAt(1))) {
        } else {
            System.out.println("WA");
            System.exit(0);
        }
        if (Character.isLowerCase(s.charAt(str.length - 1)) && count == 1) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] str;
        int count = 0;
        str = s.split("");
        if (!str[0].equals("A")) {
            System.out.println("WA");
            System.exit(0);
        }
        for (int i = 2; i <= str.length - 2; i++) {
            if (Character.isLowerCase(s.charAt(i))) {
            } else {
                if (str[i].equals("C")) {
                    count++;
                } else {
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        }
        if (Character.isLowerCase(s.charAt(1))) {
        } else {
            System.out.println("WA");
            System.exit(0);
        }
        if (Character.isLowerCase(s.charAt(str.length - 1)) && count == 1) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    }
}