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.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }
        String sub = s.substring(2, s.length()-1);
        int count = 0;
        for (int i = 0; i < sub.length(); i++) {
            if (sub.charAt(i) == 'C') count++;
        }
        if (count != 1) {
            System.out.println("WA");
            return;
        }

        int lcount = 0;
        for (int i = 0; i < s.length(); i++) {
            if (String.valueOf(s.charAt(i)).matches("[A-Z]")) lcount++;
        }
        if (lcount != 2) {
            System.out.println("WA");
        } else {
            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);
        String s = sc.next();
        if (s.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }
        String sub = s.substring(2, s.length()-1);
        int count = 0;
        for (int i = 0; i < sub.length(); i++) {
            if (sub.charAt(i) == 'C') count++;
        }
        if (count != 1) {
            System.out.println("WA");
            return;
        }

        int lcount = 0;
        for (int i = 0; i < s.length(); i++) {
            if (String.valueOf(s.charAt(i)).matches("[A-Z]")) lcount++;
        }
        if (lcount != 2) {
            System.out.println("WA");
        } else {
            System.out.println("AC");
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if (s.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }
        String sub = s.substring(2, s.length()-1);
        int count = 0;
        for (int i = 0; i < sub.length(); i++) {
            if (sub.charAt(i) == 'C') count++;
        }
        if (count != 1) {
            System.out.println("WA");
            return;
        }

        int lcount = 0;
        for (int i = 0; i < s.length(); i++) {
            if (String.valueOf(s.charAt(i)).matches("[A-Z]")) lcount++;
        }
        if (lcount != 2) {
            System.out.println("WA");
        } else {
            System.out.println("AC");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if (s.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }
        String sub = s.substring(2, s.length()-1);
        int count = 0;
        for (int i = 0; i < sub.length(); i++) {
            if (sub.charAt(i) == 'C') count++;
        }
        if (count != 1) {
            System.out.println("WA");
            return;
        }

        int lcount = 0;
        for (int i = 0; i < s.length(); i++) {
            if (String.valueOf(s.charAt(i)).matches("[A-Z]")) lcount++;
        }
        if (lcount != 2) {
            System.out.println("WA");
        } else {
            System.out.println("AC");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc 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; String sub = s.substring(2, s.length()-1); sub s.substring(2, s.length()-1) s.substring s 2 s.length()-1 s.length() s.length s 1 int count = 0; count 0 for (int i = 0; i < sub.length(); i++) {
            if (sub.charAt(i) == 'C') count++;
        } int i = 0; int i = 0; i 0 i < sub.length() i sub.length() sub.length sub i++ i++ i {
            if (sub.charAt(i) == 'C') count++;
        } {
            if (sub.charAt(i) == 'C') count++;
        } if (sub.charAt(i) == 'C') count++; sub.charAt(i) == 'C' sub.charAt(i) sub.charAt sub i 'C' count++ count if (count != 1) {
            System.out.println("WA");
            return;
        } count != 1 count 1 {
            System.out.println("WA");
            return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; int lcount = 0; lcount 0 for (int i = 0; i < s.length(); i++) {
            if (String.valueOf(s.charAt(i)).matches("[A-Z]")) lcount++;
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if (String.valueOf(s.charAt(i)).matches("[A-Z]")) lcount++;
        } {
            if (String.valueOf(s.charAt(i)).matches("[A-Z]")) lcount++;
        } if (String.valueOf(s.charAt(i)).matches("[A-Z]")) lcount++; String.valueOf(s.charAt(i)).matches("[A-Z]") String.valueOf(s.charAt(i)).matches String.valueOf(s.charAt(i)) String.valueOf String s.charAt(i) s.charAt s i "[A-Z]" lcount++ lcount if (lcount != 2) {
            System.out.println("WA");
        } else {
            System.out.println("AC");
        } lcount != 2 lcount 2 {
            System.out.println("WA");
        } System.out.println("WA") System.out.println System.out System System.out "WA" {
            System.out.println("AC");
        } 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);
        String s = sc.next();
        if (s.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }
        String sub = s.substring(2, s.length()-1);
        int count = 0;
        for (int i = 0; i < sub.length(); i++) {
            if (sub.charAt(i) == 'C') count++;
        }
        if (count != 1) {
            System.out.println("WA");
            return;
        }

        int lcount = 0;
        for (int i = 0; i < s.length(); i++) {
            if (String.valueOf(s.charAt(i)).matches("[A-Z]")) lcount++;
        }
        if (lcount != 2) {
            System.out.println("WA");
        } else {
            System.out.println("AC");
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        if (s.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }
        String sub = s.substring(2, s.length()-1);
        int count = 0;
        for (int i = 0; i < sub.length(); i++) {
            if (sub.charAt(i) == 'C') count++;
        }
        if (count != 1) {
            System.out.println("WA");
            return;
        }

        int lcount = 0;
        for (int i = 0; i < s.length(); i++) {
            if (String.valueOf(s.charAt(i)).matches("[A-Z]")) lcount++;
        }
        if (lcount != 2) {
            System.out.println("WA");
        } else {
            System.out.println("AC");
        }
    }
} 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.charAt(0) != 'A') {
            System.out.println("WA");
            return;
        }
        String sub = s.substring(2, s.length()-1);
        int count = 0;
        for (int i = 0; i < sub.length(); i++) {
            if (sub.charAt(i) == 'C') count++;
        }
        if (count != 1) {
            System.out.println("WA");
            return;
        }

        int lcount = 0;
        for (int i = 0; i < s.length(); i++) {
            if (String.valueOf(s.charAt(i)).matches("[A-Z]")) lcount++;
        }
        if (lcount != 2) {
            System.out.println("WA");
        } else {
            System.out.println("AC");
        }
    }
}