
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.nextLine();
        if (S.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }
        int ccount = 0;
        int cindx = -1;
        for (int i = 2; i < S.length() - 1; i++) {
            if (S.charAt(i) == 'C') {
                cindx = i;
                ccount++;
            }
        }

        if (ccount != 1) {
            System.out.println("WA");
            return;
        }

        for (int i = 1; i < S.length(); i++) {
            if (i != cindx) {
                if (Character.isUpperCase(S.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            }
        }

        System.out.println("AC");
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.nextLine();
        if (S.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }
        int ccount = 0;
        int cindx = -1;
        for (int i = 2; i < S.length() - 1; i++) {
            if (S.charAt(i) == 'C') {
                cindx = i;
                ccount++;
            }
        }

        if (ccount != 1) {
            System.out.println("WA");
            return;
        }

        for (int i = 1; i < S.length(); i++) {
            if (i != cindx) {
                if (Character.isUpperCase(S.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            }
        }

        System.out.println("AC");
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.nextLine();
        if (S.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }
        int ccount = 0;
        int cindx = -1;
        for (int i = 2; i < S.length() - 1; i++) {
            if (S.charAt(i) == 'C') {
                cindx = i;
                ccount++;
            }
        }

        if (ccount != 1) {
            System.out.println("WA");
            return;
        }

        for (int i = 1; i < S.length(); i++) {
            if (i != cindx) {
                if (Character.isUpperCase(S.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            }
        }

        System.out.println("AC");
    } main {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.nextLine();
        if (S.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }
        int ccount = 0;
        int cindx = -1;
        for (int i = 2; i < S.length() - 1; i++) {
            if (S.charAt(i) == 'C') {
                cindx = i;
                ccount++;
            }
        }

        if (ccount != 1) {
            System.out.println("WA");
            return;
        }

        for (int i = 1; i < S.length(); i++) {
            if (i != cindx) {
                if (Character.isUpperCase(S.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            }
        }

        System.out.println("AC");
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String S = scanner.nextLine(); S scanner.nextLine() scanner.nextLine scanner if (S.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        } S.charAt(0) != 'A' S.charAt(0) S.charAt S 0 'A' {
            System.out.println("WA");
            return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; int ccount = 0; ccount 0 int cindx = -1; cindx -1 1 for (int i = 2; i < S.length() - 1; i++) {
            if (S.charAt(i) == 'C') {
                cindx = i;
                ccount++;
            }
        } int i = 2; int i = 2; i 2 i < S.length() - 1 i S.length() - 1 S.length() S.length S 1 i++ i++ i {
            if (S.charAt(i) == 'C') {
                cindx = i;
                ccount++;
            }
        } {
            if (S.charAt(i) == 'C') {
                cindx = i;
                ccount++;
            }
        } if (S.charAt(i) == 'C') {
                cindx = i;
                ccount++;
            } S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' {
                cindx = i;
                ccount++;
            } cindx = i cindx i ccount++ ccount if (ccount != 1) {
            System.out.println("WA");
            return;
        } ccount != 1 ccount 1 {
            System.out.println("WA");
            return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; for (int i = 1; i < S.length(); i++) {
            if (i != cindx) {
                if (Character.isUpperCase(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 != cindx) {
                if (Character.isUpperCase(S.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            }
        } {
            if (i != cindx) {
                if (Character.isUpperCase(S.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            }
        } if (i != cindx) {
                if (Character.isUpperCase(S.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            } i != cindx i cindx {
                if (Character.isUpperCase(S.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            } if (Character.isUpperCase(S.charAt(i))) {
                    System.out.println("WA");
                    return;
                } Character.isUpperCase(S.charAt(i)) Character.isUpperCase 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" String[] args args

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String S = scanner.nextLine();
        if (S.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }
        int ccount = 0;
        int cindx = -1;
        for (int i = 2; i < S.length() - 1; i++) {
            if (S.charAt(i) == 'C') {
                cindx = i;
                ccount++;
            }
        }

        if (ccount != 1) {
            System.out.println("WA");
            return;
        }

        for (int i = 1; i < S.length(); i++) {
            if (i != cindx) {
                if (Character.isUpperCase(S.charAt(i))) {
                    System.out.println("WA");
                    return;
                }
            }
        }

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