import java.util.Scanner;

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

        if (s[0] != 'A') {
            System.out.println("WA");
            return;
        }

        int countC = 0;
        int position = 0;
        for (int i = 2; i < s.length-1; i++) {
            if (s[i] == 'C') {
                countC++;
                position = i;
            }
        }

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

        for (int i = 1; i < s.length; i++) {
            if (i == position) continue;
            if (Character.isUpperCase(s[i])) {
                System.out.println("WA");
                return;
            }
        }

        System.out.println("AC");
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();

        if (s[0] != 'A') {
            System.out.println("WA");
            return;
        }

        int countC = 0;
        int position = 0;
        for (int i = 2; i < s.length-1; i++) {
            if (s[i] == 'C') {
                countC++;
                position = i;
            }
        }

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

        for (int i = 1; i < s.length; i++) {
            if (i == position) continue;
            if (Character.isUpperCase(s[i])) {
                System.out.println("WA");
                return;
            }
        }

        System.out.println("AC");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();

        if (s[0] != 'A') {
            System.out.println("WA");
            return;
        }

        int countC = 0;
        int position = 0;
        for (int i = 2; i < s.length-1; i++) {
            if (s[i] == 'C') {
                countC++;
                position = i;
            }
        }

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

        for (int i = 1; i < s.length; i++) {
            if (i == position) continue;
            if (Character.isUpperCase(s[i])) {
                System.out.println("WA");
                return;
            }
        }

        System.out.println("AC");
    } main {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();

        if (s[0] != 'A') {
            System.out.println("WA");
            return;
        }

        int countC = 0;
        int position = 0;
        for (int i = 2; i < s.length-1; i++) {
            if (s[i] == 'C') {
                countC++;
                position = i;
            }
        }

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

        for (int i = 1; i < s.length; i++) {
            if (i == position) continue;
            if (Character.isUpperCase(s[i])) {
                System.out.println("WA");
                return;
            }
        }

        System.out.println("AC");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc if (s[0] != 'A') {
            System.out.println("WA");
            return;
        } s[0] != 'A' s[0] s 0 'A' {
            System.out.println("WA");
            return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; int countC = 0; countC 0 int position = 0; position 0 for (int i = 2; i < s.length-1; i++) {
            if (s[i] == 'C') {
                countC++;
                position = i;
            }
        } int i = 2; int i = 2; i 2 i < s.length-1 i s.length-1 s.length s s.length 1 i++ i++ i {
            if (s[i] == 'C') {
                countC++;
                position = i;
            }
        } {
            if (s[i] == 'C') {
                countC++;
                position = i;
            }
        } if (s[i] == 'C') {
                countC++;
                position = i;
            } s[i] == 'C' s[i] s i 'C' {
                countC++;
                position = i;
            } countC++ countC position = i position i if (countC != 1) {
            System.out.println("WA");
            return;
        } countC != 1 countC 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 == position) continue;
            if (Character.isUpperCase(s[i])) {
                System.out.println("WA");
                return;
            }
        } int i = 1; int i = 1; i 1 i < s.length i s.length s s.length i++ i++ i {
            if (i == position) continue;
            if (Character.isUpperCase(s[i])) {
                System.out.println("WA");
                return;
            }
        } {
            if (i == position) continue;
            if (Character.isUpperCase(s[i])) {
                System.out.println("WA");
                return;
            }
        } if (i == position) continue; i == position i position continue; if (Character.isUpperCase(s[i])) {
                System.out.println("WA");
                return;
            } Character.isUpperCase(s[i]) Character.isUpperCase Character s[i] 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 public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();

        if (s[0] != 'A') {
            System.out.println("WA");
            return;
        }

        int countC = 0;
        int position = 0;
        for (int i = 2; i < s.length-1; i++) {
            if (s[i] == 'C') {
                countC++;
                position = i;
            }
        }

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

        for (int i = 1; i < s.length; i++) {
            if (i == position) continue;
            if (Character.isUpperCase(s[i])) {
                System.out.println("WA");
                return;
            }
        }

        System.out.println("AC");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();

        if (s[0] != 'A') {
            System.out.println("WA");
            return;
        }

        int countC = 0;
        int position = 0;
        for (int i = 2; i < s.length-1; i++) {
            if (s[i] == 'C') {
                countC++;
                position = i;
            }
        }

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

        for (int i = 1; i < s.length; i++) {
            if (i == position) continue;
            if (Character.isUpperCase(s[i])) {
                System.out.println("WA");
                return;
            }
        }

        System.out.println("AC");
    }
} Main
import java.util.Scanner;

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

        if (s[0] != 'A') {
            System.out.println("WA");
            return;
        }

        int countC = 0;
        int position = 0;
        for (int i = 2; i < s.length-1; i++) {
            if (s[i] == 'C') {
                countC++;
                position = i;
            }
        }

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

        for (int i = 1; i < s.length; i++) {
            if (i == position) continue;
            if (Character.isUpperCase(s[i])) {
                System.out.println("WA");
                return;
            }
        }

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