import 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 c = 0;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                c++;
            }
        }

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

        for (int i = 0; i < s.length(); i++) {
            char c1 = s.charAt(i);
            if (c1 == 'A' || c1 == 'C') {
                continue;
            }

            if ((c1 >= 'a') && (c1 <= 'z')) {

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

    }
} import java.util.*; util.* java 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 c = 0;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                c++;
            }
        }

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

        for (int i = 0; i < s.length(); i++) {
            char c1 = s.charAt(i);
            if (c1 == 'A' || c1 == 'C') {
                continue;
            }

            if ((c1 >= 'a') && (c1 <= 'z')) {

            } else {
                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 c = 0;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                c++;
            }
        }

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

        for (int i = 0; i < s.length(); i++) {
            char c1 = s.charAt(i);
            if (c1 == 'A' || c1 == 'C') {
                continue;
            }

            if ((c1 >= 'a') && (c1 <= 'z')) {

            } else {
                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 c = 0;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                c++;
            }
        }

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

        for (int i = 0; i < s.length(); i++) {
            char c1 = s.charAt(i);
            if (c1 == 'A' || c1 == 'C') {
                continue;
            }

            if ((c1 >= 'a') && (c1 <= 'z')) {

            } else {
                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 c = 0; c 0 for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                c++;
            }
        } 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') {
                c++;
            }
        } {
            if (s.charAt(i) == 'C') {
                c++;
            }
        } if (s.charAt(i) == 'C') {
                c++;
            } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
                c++;
            } c++ c if (c != 1) {
            System.out.println("WA");
            return;
        } c != 1 c 1 {
            System.out.println("WA");
            return;
        } System.out.println("WA") System.out.println System.out System System.out "WA" return; for (int i = 0; i < s.length(); i++) {
            char c1 = s.charAt(i);
            if (c1 == 'A' || c1 == 'C') {
                continue;
            }

            if ((c1 >= 'a') && (c1 <= 'z')) {

            } else {
                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 {
            char c1 = s.charAt(i);
            if (c1 == 'A' || c1 == 'C') {
                continue;
            }

            if ((c1 >= 'a') && (c1 <= 'z')) {

            } else {
                System.out.println("WA");
                return;
            }
        } {
            char c1 = s.charAt(i);
            if (c1 == 'A' || c1 == 'C') {
                continue;
            }

            if ((c1 >= 'a') && (c1 <= 'z')) {

            } else {
                System.out.println("WA");
                return;
            }
        } char c1 = s.charAt(i); c1 s.charAt(i) s.charAt s i if (c1 == 'A' || c1 == 'C') {
                continue;
            } c1 == 'A' || c1 == 'C' c1 == 'A' c1 'A' c1 == 'C' c1 'C' {
                continue;
            } continue; if ((c1 >= 'a') && (c1 <= 'z')) {

            } else {
                System.out.println("WA");
                return;
            } (c1 >= 'a') && (c1 <= 'z') (c1 >= 'a') c1 'a' (c1 <= 'z') c1 '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 c = 0;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                c++;
            }
        }

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

        for (int i = 0; i < s.length(); i++) {
            char c1 = s.charAt(i);
            if (c1 == 'A' || c1 == 'C') {
                continue;
            }

            if ((c1 >= 'a') && (c1 <= 'z')) {

            } else {
                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 c = 0;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                c++;
            }
        }

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

        for (int i = 0; i < s.length(); i++) {
            char c1 = s.charAt(i);
            if (c1 == 'A' || c1 == 'C') {
                continue;
            }

            if ((c1 >= 'a') && (c1 <= 'z')) {

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

    }
} Main
import 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 c = 0;
        for (int i = 2; i <= s.length() - 2; i++) {
            if (s.charAt(i) == 'C') {
                c++;
            }
        }

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

        for (int i = 0; i < s.length(); i++) {
            char c1 = s.charAt(i);
            if (c1 == 'A' || c1 == 'C') {
                continue;
            }

            if ((c1 >= 'a') && (c1 <= 'z')) {

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

    }
}
