import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        // 主処理
        char[] array = s.toCharArray();
        int countC = 0;
        boolean judge = true;
        for (int i = 0; i < array.length; i++) {
            if (i == 0) {
                judge = judge && array[i] == 'A';

            } else if (2 <= i && i <= array.length - 2) {
                if (array[i] == 'C') {
                    countC++;
                } else {
                    judge = judge && Character.isLowerCase(array[i]);
                }

            } else {
                judge = judge && Character.isLowerCase(array[i]);
            }
        }
        String result = judge && countC == 1 ? "AC" : "WA";

        // 出力
        System.out.println(result);
        sc.close();
    }
} import java.util.*; util.* java public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        // 主処理
        char[] array = s.toCharArray();
        int countC = 0;
        boolean judge = true;
        for (int i = 0; i < array.length; i++) {
            if (i == 0) {
                judge = judge && array[i] == 'A';

            } else if (2 <= i && i <= array.length - 2) {
                if (array[i] == 'C') {
                    countC++;
                } else {
                    judge = judge && Character.isLowerCase(array[i]);
                }

            } else {
                judge = judge && Character.isLowerCase(array[i]);
            }
        }
        String result = judge && countC == 1 ? "AC" : "WA";

        // 出力
        System.out.println(result);
        sc.close();
    }
} Main public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        // 主処理
        char[] array = s.toCharArray();
        int countC = 0;
        boolean judge = true;
        for (int i = 0; i < array.length; i++) {
            if (i == 0) {
                judge = judge && array[i] == 'A';

            } else if (2 <= i && i <= array.length - 2) {
                if (array[i] == 'C') {
                    countC++;
                } else {
                    judge = judge && Character.isLowerCase(array[i]);
                }

            } else {
                judge = judge && Character.isLowerCase(array[i]);
            }
        }
        String result = judge && countC == 1 ? "AC" : "WA";

        // 出力
        System.out.println(result);
        sc.close();
    } main {

        // 入力
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        // 主処理
        char[] array = s.toCharArray();
        int countC = 0;
        boolean judge = true;
        for (int i = 0; i < array.length; i++) {
            if (i == 0) {
                judge = judge && array[i] == 'A';

            } else if (2 <= i && i <= array.length - 2) {
                if (array[i] == 'C') {
                    countC++;
                } else {
                    judge = judge && Character.isLowerCase(array[i]);
                }

            } else {
                judge = judge && Character.isLowerCase(array[i]);
            }
        }
        String result = judge && countC == 1 ? "AC" : "WA";

        // 出力
        System.out.println(result);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc char[] array = s.toCharArray(); array s.toCharArray() s.toCharArray s int countC = 0; countC 0 boolean judge = true; judge true for (int i = 0; i < array.length; i++) {
            if (i == 0) {
                judge = judge && array[i] == 'A';

            } else if (2 <= i && i <= array.length - 2) {
                if (array[i] == 'C') {
                    countC++;
                } else {
                    judge = judge && Character.isLowerCase(array[i]);
                }

            } else {
                judge = judge && Character.isLowerCase(array[i]);
            }
        } int i = 0; int i = 0; i 0 i < array.length i array.length array array.length i++ i++ i {
            if (i == 0) {
                judge = judge && array[i] == 'A';

            } else if (2 <= i && i <= array.length - 2) {
                if (array[i] == 'C') {
                    countC++;
                } else {
                    judge = judge && Character.isLowerCase(array[i]);
                }

            } else {
                judge = judge && Character.isLowerCase(array[i]);
            }
        } {
            if (i == 0) {
                judge = judge && array[i] == 'A';

            } else if (2 <= i && i <= array.length - 2) {
                if (array[i] == 'C') {
                    countC++;
                } else {
                    judge = judge && Character.isLowerCase(array[i]);
                }

            } else {
                judge = judge && Character.isLowerCase(array[i]);
            }
        } if (i == 0) {
                judge = judge && array[i] == 'A';

            } else if (2 <= i && i <= array.length - 2) {
                if (array[i] == 'C') {
                    countC++;
                } else {
                    judge = judge && Character.isLowerCase(array[i]);
                }

            } else {
                judge = judge && Character.isLowerCase(array[i]);
            } i == 0 i 0 {
                judge = judge && array[i] == 'A';

            } judge = judge && array[i] == 'A' judge judge && array[i] == 'A' judge array[i] == 'A' array[i] array i 'A' if (2 <= i && i <= array.length - 2) {
                if (array[i] == 'C') {
                    countC++;
                } else {
                    judge = judge && Character.isLowerCase(array[i]);
                }

            } else {
                judge = judge && Character.isLowerCase(array[i]);
            } 2 <= i && i <= array.length - 2 2 <= i 2 i i <= array.length - 2 i array.length - 2 array.length array array.length 2 {
                if (array[i] == 'C') {
                    countC++;
                } else {
                    judge = judge && Character.isLowerCase(array[i]);
                }

            } if (array[i] == 'C') {
                    countC++;
                } else {
                    judge = judge && Character.isLowerCase(array[i]);
                } array[i] == 'C' array[i] array i 'C' {
                    countC++;
                } countC++ countC {
                    judge = judge && Character.isLowerCase(array[i]);
                } judge = judge && Character.isLowerCase(array[i]) judge judge && Character.isLowerCase(array[i]) judge Character.isLowerCase(array[i]) Character.isLowerCase Character array[i] array i {
                judge = judge && Character.isLowerCase(array[i]);
            } judge = judge && Character.isLowerCase(array[i]) judge judge && Character.isLowerCase(array[i]) judge Character.isLowerCase(array[i]) Character.isLowerCase Character array[i] array i String result = judge && countC == 1 ? "AC" : "WA"; result judge && countC == 1 ? "AC" : "WA" judge && countC == 1 judge countC == 1 countC 1 "AC" "WA" System.out.println(result) System.out.println System.out System System.out result sc.close() sc.close sc String args[] args public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        // 主処理
        char[] array = s.toCharArray();
        int countC = 0;
        boolean judge = true;
        for (int i = 0; i < array.length; i++) {
            if (i == 0) {
                judge = judge && array[i] == 'A';

            } else if (2 <= i && i <= array.length - 2) {
                if (array[i] == 'C') {
                    countC++;
                } else {
                    judge = judge && Character.isLowerCase(array[i]);
                }

            } else {
                judge = judge && Character.isLowerCase(array[i]);
            }
        }
        String result = judge && countC == 1 ? "AC" : "WA";

        // 出力
        System.out.println(result);
        sc.close();
    }
} public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        // 主処理
        char[] array = s.toCharArray();
        int countC = 0;
        boolean judge = true;
        for (int i = 0; i < array.length; i++) {
            if (i == 0) {
                judge = judge && array[i] == 'A';

            } else if (2 <= i && i <= array.length - 2) {
                if (array[i] == 'C') {
                    countC++;
                } else {
                    judge = judge && Character.isLowerCase(array[i]);
                }

            } else {
                judge = judge && Character.isLowerCase(array[i]);
            }
        }
        String result = judge && countC == 1 ? "AC" : "WA";

        // 出力
        System.out.println(result);
        sc.close();
    }
} Main
import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        // 主処理
        char[] array = s.toCharArray();
        int countC = 0;
        boolean judge = true;
        for (int i = 0; i < array.length; i++) {
            if (i == 0) {
                judge = judge && array[i] == 'A';

            } else if (2 <= i && i <= array.length - 2) {
                if (array[i] == 'C') {
                    countC++;
                } else {
                    judge = judge && Character.isLowerCase(array[i]);
                }

            } else {
                judge = judge && Character.isLowerCase(array[i]);
            }
        }
        String result = judge && countC == 1 ? "AC" : "WA";

        // 出力
        System.out.println(result);
        sc.close();
    }
}
