
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if (!s.substring(0, 1).equals("A") || s.substring(1, 2).equals("C")) {
            System.out.println("WA");
        } else {
            int c = 0;
            for (int i = 2 ; i < s.length(); i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c++;
                }


            }
            int d = 0;
            for (int i = 0; i < s.length(); i++) {
                if (Character.isUpperCase(s.charAt(i))) {
                    d ++;
                }
            }
            if (c == 1 && !s.substring(s.length() -1, s.length()).equals("C") && d == 2) {

                System.out.println("AC");
            } else {
                System.out.println("WA");
            }
        }
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if (!s.substring(0, 1).equals("A") || s.substring(1, 2).equals("C")) {
            System.out.println("WA");
        } else {
            int c = 0;
            for (int i = 2 ; i < s.length(); i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c++;
                }


            }
            int d = 0;
            for (int i = 0; i < s.length(); i++) {
                if (Character.isUpperCase(s.charAt(i))) {
                    d ++;
                }
            }
            if (c == 1 && !s.substring(s.length() -1, s.length()).equals("C") && d == 2) {

                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();
        if (!s.substring(0, 1).equals("A") || s.substring(1, 2).equals("C")) {
            System.out.println("WA");
        } else {
            int c = 0;
            for (int i = 2 ; i < s.length(); i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c++;
                }


            }
            int d = 0;
            for (int i = 0; i < s.length(); i++) {
                if (Character.isUpperCase(s.charAt(i))) {
                    d ++;
                }
            }
            if (c == 1 && !s.substring(s.length() -1, s.length()).equals("C") && d == 2) {

                System.out.println("AC");
            } else {
                System.out.println("WA");
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if (!s.substring(0, 1).equals("A") || s.substring(1, 2).equals("C")) {
            System.out.println("WA");
        } else {
            int c = 0;
            for (int i = 2 ; i < s.length(); i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c++;
                }


            }
            int d = 0;
            for (int i = 0; i < s.length(); i++) {
                if (Character.isUpperCase(s.charAt(i))) {
                    d ++;
                }
            }
            if (c == 1 && !s.substring(s.length() -1, s.length()).equals("C") && d == 2) {

                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 if (!s.substring(0, 1).equals("A") || s.substring(1, 2).equals("C")) {
            System.out.println("WA");
        } else {
            int c = 0;
            for (int i = 2 ; i < s.length(); i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c++;
                }


            }
            int d = 0;
            for (int i = 0; i < s.length(); i++) {
                if (Character.isUpperCase(s.charAt(i))) {
                    d ++;
                }
            }
            if (c == 1 && !s.substring(s.length() -1, s.length()).equals("C") && d == 2) {

                System.out.println("AC");
            } else {
                System.out.println("WA");
            }
        } !s.substring(0, 1).equals("A") || s.substring(1, 2).equals("C") !s.substring(0, 1).equals("A") s.substring(0, 1).equals("A") s.substring(0, 1).equals s.substring(0, 1) s.substring s 0 1 "A" s.substring(1, 2).equals("C") s.substring(1, 2).equals s.substring(1, 2) s.substring s 1 2 "C" {
            System.out.println("WA");
        } System.out.println("WA") System.out.println System.out System System.out "WA" {
            int c = 0;
            for (int i = 2 ; i < s.length(); i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c++;
                }


            }
            int d = 0;
            for (int i = 0; i < s.length(); i++) {
                if (Character.isUpperCase(s.charAt(i))) {
                    d ++;
                }
            }
            if (c == 1 && !s.substring(s.length() -1, s.length()).equals("C") && d == 2) {

                System.out.println("AC");
            } else {
                System.out.println("WA");
            }
        } int c = 0; c 0 for (int i = 2 ; i < s.length(); i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c++;
                }


            } int i = 2 ; int i = 2 ; i 2 i < s.length() i s.length() s.length s i++ i++ i {
                if (s.substring(i, i + 1).equals("C")) {
                    c++;
                }


            } {
                if (s.substring(i, i + 1).equals("C")) {
                    c++;
                }


            } if (s.substring(i, i + 1).equals("C")) {
                    c++;
                } s.substring(i, i + 1).equals("C") s.substring(i, i + 1).equals s.substring(i, i + 1) s.substring s i i + 1 i 1 "C" {
                    c++;
                } c++ c int d = 0; d 0 for (int i = 0; i < s.length(); i++) {
                if (Character.isUpperCase(s.charAt(i))) {
                    d ++;
                }
            } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
                if (Character.isUpperCase(s.charAt(i))) {
                    d ++;
                }
            } {
                if (Character.isUpperCase(s.charAt(i))) {
                    d ++;
                }
            } if (Character.isUpperCase(s.charAt(i))) {
                    d ++;
                } Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i {
                    d ++;
                } d ++ d if (c == 1 && !s.substring(s.length() -1, s.length()).equals("C") && d == 2) {

                System.out.println("AC");
            } else {
                System.out.println("WA");
            } c == 1 && !s.substring(s.length() -1, s.length()).equals("C") && d == 2 c == 1 && !s.substring(s.length() -1, s.length()).equals("C") && d == 2 c == 1 c 1 !s.substring(s.length() -1, s.length()).equals("C") s.substring(s.length() -1, s.length()).equals("C") s.substring(s.length() -1, s.length()).equals s.substring(s.length() -1, s.length()) s.substring s s.length() -1 s.length() s.length s 1 s.length() s.length s "C" d == 2 d 2 {

                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();
        if (!s.substring(0, 1).equals("A") || s.substring(1, 2).equals("C")) {
            System.out.println("WA");
        } else {
            int c = 0;
            for (int i = 2 ; i < s.length(); i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c++;
                }


            }
            int d = 0;
            for (int i = 0; i < s.length(); i++) {
                if (Character.isUpperCase(s.charAt(i))) {
                    d ++;
                }
            }
            if (c == 1 && !s.substring(s.length() -1, s.length()).equals("C") && d == 2) {

                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();
        if (!s.substring(0, 1).equals("A") || s.substring(1, 2).equals("C")) {
            System.out.println("WA");
        } else {
            int c = 0;
            for (int i = 2 ; i < s.length(); i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c++;
                }


            }
            int d = 0;
            for (int i = 0; i < s.length(); i++) {
                if (Character.isUpperCase(s.charAt(i))) {
                    d ++;
                }
            }
            if (c == 1 && !s.substring(s.length() -1, s.length()).equals("C") && d == 2) {

                System.out.println("AC");
            } else {
                System.out.println("WA");
            }
        }
    }

} Main

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if (!s.substring(0, 1).equals("A") || s.substring(1, 2).equals("C")) {
            System.out.println("WA");
        } else {
            int c = 0;
            for (int i = 2 ; i < s.length(); i++) {
                if (s.substring(i, i + 1).equals("C")) {
                    c++;
                }


            }
            int d = 0;
            for (int i = 0; i < s.length(); i++) {
                if (Character.isUpperCase(s.charAt(i))) {
                    d ++;
                }
            }
            if (c == 1 && !s.substring(s.length() -1, s.length()).equals("C") && d == 2) {

                System.out.println("AC");
            } else {
                System.out.println("WA");
            }
        }
    }

}