import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();

        boolean isOk = true;
        if (s.charAt(0) != 'A') {
            isOk = false;
        }
        String islowerString = s.substring(1);

        int cCount = 0;
//        for (int i = 2; i < s.length() - 1; i++) {
        for (int i = 1; i < islowerString.length() - 1; i++) {
            if (islowerString.charAt(i) == 'C') {
                cCount++;
                islowerString = islowerString.substring(0, i) + islowerString.substring(i + 1);
            }
        }
        if (cCount != 1) {
            isOk = false;
        }

        for (int i = 0; i < islowerString.length(); i++) {
            if (islowerString.charAt(i) < 'a' || islowerString.charAt(i) > 'z') {
                isOk = false;
                break;
            }
        }

        if (isOk) {
            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();
        sc.close();

        boolean isOk = true;
        if (s.charAt(0) != 'A') {
            isOk = false;
        }
        String islowerString = s.substring(1);

        int cCount = 0;
//        for (int i = 2; i < s.length() - 1; i++) {
        for (int i = 1; i < islowerString.length() - 1; i++) {
            if (islowerString.charAt(i) == 'C') {
                cCount++;
                islowerString = islowerString.substring(0, i) + islowerString.substring(i + 1);
            }
        }
        if (cCount != 1) {
            isOk = false;
        }

        for (int i = 0; i < islowerString.length(); i++) {
            if (islowerString.charAt(i) < 'a' || islowerString.charAt(i) > 'z') {
                isOk = false;
                break;
            }
        }

        if (isOk) {
            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();
        sc.close();

        boolean isOk = true;
        if (s.charAt(0) != 'A') {
            isOk = false;
        }
        String islowerString = s.substring(1);

        int cCount = 0;
//        for (int i = 2; i < s.length() - 1; i++) {
        for (int i = 1; i < islowerString.length() - 1; i++) {
            if (islowerString.charAt(i) == 'C') {
                cCount++;
                islowerString = islowerString.substring(0, i) + islowerString.substring(i + 1);
            }
        }
        if (cCount != 1) {
            isOk = false;
        }

        for (int i = 0; i < islowerString.length(); i++) {
            if (islowerString.charAt(i) < 'a' || islowerString.charAt(i) > 'z') {
                isOk = false;
                break;
            }
        }

        if (isOk) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();

        boolean isOk = true;
        if (s.charAt(0) != 'A') {
            isOk = false;
        }
        String islowerString = s.substring(1);

        int cCount = 0;
//        for (int i = 2; i < s.length() - 1; i++) {
        for (int i = 1; i < islowerString.length() - 1; i++) {
            if (islowerString.charAt(i) == 'C') {
                cCount++;
                islowerString = islowerString.substring(0, i) + islowerString.substring(i + 1);
            }
        }
        if (cCount != 1) {
            isOk = false;
        }

        for (int i = 0; i < islowerString.length(); i++) {
            if (islowerString.charAt(i) < 'a' || islowerString.charAt(i) > 'z') {
                isOk = false;
                break;
            }
        }

        if (isOk) {
            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 sc.close() sc.close sc boolean isOk = true; isOk true if (s.charAt(0) != 'A') {
            isOk = false;
        } s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' {
            isOk = false;
        } isOk = false isOk false String islowerString = s.substring(1); islowerString s.substring(1) s.substring s 1 int cCount = 0; cCount 0 for (int i = 1; i < islowerString.length() - 1; i++) {
            if (islowerString.charAt(i) == 'C') {
                cCount++;
                islowerString = islowerString.substring(0, i) + islowerString.substring(i + 1);
            }
        } int i = 1; int i = 1; i 1 i < islowerString.length() - 1 i islowerString.length() - 1 islowerString.length() islowerString.length islowerString 1 i++ i++ i {
            if (islowerString.charAt(i) == 'C') {
                cCount++;
                islowerString = islowerString.substring(0, i) + islowerString.substring(i + 1);
            }
        } {
            if (islowerString.charAt(i) == 'C') {
                cCount++;
                islowerString = islowerString.substring(0, i) + islowerString.substring(i + 1);
            }
        } if (islowerString.charAt(i) == 'C') {
                cCount++;
                islowerString = islowerString.substring(0, i) + islowerString.substring(i + 1);
            } islowerString.charAt(i) == 'C' islowerString.charAt(i) islowerString.charAt islowerString i 'C' {
                cCount++;
                islowerString = islowerString.substring(0, i) + islowerString.substring(i + 1);
            } cCount++ cCount islowerString = islowerString.substring(0, i) + islowerString.substring(i + 1) islowerString islowerString.substring(0, i) + islowerString.substring(i + 1) islowerString.substring(0, i) islowerString.substring islowerString 0 i islowerString.substring(i + 1) islowerString.substring islowerString i + 1 i 1 if (cCount != 1) {
            isOk = false;
        } cCount != 1 cCount 1 {
            isOk = false;
        } isOk = false isOk false for (int i = 0; i < islowerString.length(); i++) {
            if (islowerString.charAt(i) < 'a' || islowerString.charAt(i) > 'z') {
                isOk = false;
                break;
            }
        } int i = 0; int i = 0; i 0 i < islowerString.length() i islowerString.length() islowerString.length islowerString i++ i++ i {
            if (islowerString.charAt(i) < 'a' || islowerString.charAt(i) > 'z') {
                isOk = false;
                break;
            }
        } {
            if (islowerString.charAt(i) < 'a' || islowerString.charAt(i) > 'z') {
                isOk = false;
                break;
            }
        } if (islowerString.charAt(i) < 'a' || islowerString.charAt(i) > 'z') {
                isOk = false;
                break;
            } islowerString.charAt(i) < 'a' || islowerString.charAt(i) > 'z' islowerString.charAt(i) < 'a' islowerString.charAt(i) islowerString.charAt islowerString i 'a' islowerString.charAt(i) > 'z' islowerString.charAt(i) islowerString.charAt islowerString i 'z' {
                isOk = false;
                break;
            } isOk = false isOk false break; if (isOk) {
            System.out.println("AC");
        } else {
            System.out.println("WA");
        } isOk {
            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();
        sc.close();

        boolean isOk = true;
        if (s.charAt(0) != 'A') {
            isOk = false;
        }
        String islowerString = s.substring(1);

        int cCount = 0;
//        for (int i = 2; i < s.length() - 1; i++) {
        for (int i = 1; i < islowerString.length() - 1; i++) {
            if (islowerString.charAt(i) == 'C') {
                cCount++;
                islowerString = islowerString.substring(0, i) + islowerString.substring(i + 1);
            }
        }
        if (cCount != 1) {
            isOk = false;
        }

        for (int i = 0; i < islowerString.length(); i++) {
            if (islowerString.charAt(i) < 'a' || islowerString.charAt(i) > 'z') {
                isOk = false;
                break;
            }
        }

        if (isOk) {
            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();
        sc.close();

        boolean isOk = true;
        if (s.charAt(0) != 'A') {
            isOk = false;
        }
        String islowerString = s.substring(1);

        int cCount = 0;
//        for (int i = 2; i < s.length() - 1; i++) {
        for (int i = 1; i < islowerString.length() - 1; i++) {
            if (islowerString.charAt(i) == 'C') {
                cCount++;
                islowerString = islowerString.substring(0, i) + islowerString.substring(i + 1);
            }
        }
        if (cCount != 1) {
            isOk = false;
        }

        for (int i = 0; i < islowerString.length(); i++) {
            if (islowerString.charAt(i) < 'a' || islowerString.charAt(i) > 'z') {
                isOk = false;
                break;
            }
        }

        if (isOk) {
            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();
        sc.close();

        boolean isOk = true;
        if (s.charAt(0) != 'A') {
            isOk = false;
        }
        String islowerString = s.substring(1);

        int cCount = 0;
//        for (int i = 2; i < s.length() - 1; i++) {
        for (int i = 1; i < islowerString.length() - 1; i++) {
            if (islowerString.charAt(i) == 'C') {
                cCount++;
                islowerString = islowerString.substring(0, i) + islowerString.substring(i + 1);
            }
        }
        if (cCount != 1) {
            isOk = false;
        }

        for (int i = 0; i < islowerString.length(); i++) {
            if (islowerString.charAt(i) < 'a' || islowerString.charAt(i) > 'z') {
                isOk = false;
                break;
            }
        }

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

}
