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;
        }

        int count = 0;
        int pos = -1;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                count++;
                pos = i;
            }
        }
        if (count != 1) {
            System.out.println("WA");
            return;
        }
        s = s.substring(1, pos) + s.substring(pos + 1, s.length());

        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) < 'a' || s.charAt(i) > 'z') {
                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);
        String s = sc.next();

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

        int count = 0;
        int pos = -1;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                count++;
                pos = i;
            }
        }
        if (count != 1) {
            System.out.println("WA");
            return;
        }
        s = s.substring(1, pos) + s.substring(pos + 1, s.length());

        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) < 'a' || s.charAt(i) > 'z') {
                System.out.println("WA");
                return;
            }
        }

        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;
        }

        int count = 0;
        int pos = -1;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                count++;
                pos = i;
            }
        }
        if (count != 1) {
            System.out.println("WA");
            return;
        }
        s = s.substring(1, pos) + s.substring(pos + 1, s.length());

        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) < 'a' || s.charAt(i) > 'z') {
                System.out.println("WA");
                return;
            }
        }

        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;
        }

        int count = 0;
        int pos = -1;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                count++;
                pos = i;
            }
        }
        if (count != 1) {
            System.out.println("WA");
            return;
        }
        s = s.substring(1, pos) + s.substring(pos + 1, s.length());

        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) < 'a' || s.charAt(i) > 'z') {
                System.out.println("WA");
                return;
            }
        }

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

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

        int count = 0;
        int pos = -1;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                count++;
                pos = i;
            }
        }
        if (count != 1) {
            System.out.println("WA");
            return;
        }
        s = s.substring(1, pos) + s.substring(pos + 1, s.length());

        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) < 'a' || s.charAt(i) > 'z') {
                System.out.println("WA");
                return;
            }
        }

        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;
        }

        int count = 0;
        int pos = -1;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                count++;
                pos = i;
            }
        }
        if (count != 1) {
            System.out.println("WA");
            return;
        }
        s = s.substring(1, pos) + s.substring(pos + 1, s.length());

        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) < 'a' || s.charAt(i) > 'z') {
                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);
        String s = sc.next();

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

        int count = 0;
        int pos = -1;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                count++;
                pos = i;
            }
        }
        if (count != 1) {
            System.out.println("WA");
            return;
        }
        s = s.substring(1, pos) + s.substring(pos + 1, s.length());

        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) < 'a' || s.charAt(i) > 'z') {
                System.out.println("WA");
                return;
            }
        }

        System.out.println("AC");

    }
}
