import java.io.*;

/**
 * Copyright © 2018 Chris. All rights reserved.
 *
 * @author Chris
 * 2018/6/23 11:55
 * @see meituan.n2018.Bturn
 */
public class Main {


    private static BufferedReader br;
    private static StreamTokenizer st;
    private static PrintWriter pw;

    private static void solve() throws IOException {
        String s = nextLine();
        int n = s.length();

        if (s.charAt(0) != 'A' || s.charAt(1) < 'a') {
            pw.print("WA");
            return;
        }
        boolean flag = false;
        for (int i = 2; i < n; i++) {
            if (s.charAt(i) < 'a') {
                if (flag || s.charAt(i) != 'C') {
                    pw.print("WA");
                    return;
                } else {
                    if (i == n - 1) {
                        pw.print("WA");
                        return;
                    }
                    flag = true;
                }
            }
        }
        if (!flag) {
            pw.print("WA");
        } else {
            pw.print("AC");
        }
    }

    public static void main(String args[]) throws IOException {
//        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
//        if (!oj) {
//            System.setIn(new FileInputStream("src/in.txt"));
//        }
        br = new BufferedReader(new InputStreamReader(System.in));
        st = new StreamTokenizer(br);
        pw = new PrintWriter(new OutputStreamWriter(System.out));
        st.ordinaryChar('\''); //指定单引号、双引号和注释符号是普通字符
        st.ordinaryChar('\"');
        st.ordinaryChar('/');

        long t = System.currentTimeMillis();
        solve();
//        if (!oj) {
//            pw.println("[" + (System.currentTimeMillis() - t) + "ms]");
//        }
        pw.flush();
    }


    private static int nextInt() throws IOException {
        st.nextToken();
        return (int) st.nval;
    }

    private static long nextLong() throws IOException {
        st.nextToken();
        return (long) st.nval;
    }

    private static double nextDouble() throws IOException {
        st.nextToken();
        return st.nval;
    }

    private static String[] nextSS(String reg) throws IOException {
        return br.readLine().split(reg);
    }

    private static String nextLine() throws IOException {
        return br.readLine();
    }
} import java.io.*; io.* java public class Main {


    private static BufferedReader br;
    private static StreamTokenizer st;
    private static PrintWriter pw;

    private static void solve() throws IOException {
        String s = nextLine();
        int n = s.length();

        if (s.charAt(0) != 'A' || s.charAt(1) < 'a') {
            pw.print("WA");
            return;
        }
        boolean flag = false;
        for (int i = 2; i < n; i++) {
            if (s.charAt(i) < 'a') {
                if (flag || s.charAt(i) != 'C') {
                    pw.print("WA");
                    return;
                } else {
                    if (i == n - 1) {
                        pw.print("WA");
                        return;
                    }
                    flag = true;
                }
            }
        }
        if (!flag) {
            pw.print("WA");
        } else {
            pw.print("AC");
        }
    }

    public static void main(String args[]) throws IOException {
//        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
//        if (!oj) {
//            System.setIn(new FileInputStream("src/in.txt"));
//        }
        br = new BufferedReader(new InputStreamReader(System.in));
        st = new StreamTokenizer(br);
        pw = new PrintWriter(new OutputStreamWriter(System.out));
        st.ordinaryChar('\''); //指定单引号、双引号和注释符号是普通字符
        st.ordinaryChar('\"');
        st.ordinaryChar('/');

        long t = System.currentTimeMillis();
        solve();
//        if (!oj) {
//            pw.println("[" + (System.currentTimeMillis() - t) + "ms]");
//        }
        pw.flush();
    }


    private static int nextInt() throws IOException {
        st.nextToken();
        return (int) st.nval;
    }

    private static long nextLong() throws IOException {
        st.nextToken();
        return (long) st.nval;
    }

    private static double nextDouble() throws IOException {
        st.nextToken();
        return st.nval;
    }

    private static String[] nextSS(String reg) throws IOException {
        return br.readLine().split(reg);
    }

    private static String nextLine() throws IOException {
        return br.readLine();
    }
} Main private static BufferedReader br; br private static StreamTokenizer st; st private static PrintWriter pw; pw private static void solve() throws IOException {
        String s = nextLine();
        int n = s.length();

        if (s.charAt(0) != 'A' || s.charAt(1) < 'a') {
            pw.print("WA");
            return;
        }
        boolean flag = false;
        for (int i = 2; i < n; i++) {
            if (s.charAt(i) < 'a') {
                if (flag || s.charAt(i) != 'C') {
                    pw.print("WA");
                    return;
                } else {
                    if (i == n - 1) {
                        pw.print("WA");
                        return;
                    }
                    flag = true;
                }
            }
        }
        if (!flag) {
            pw.print("WA");
        } else {
            pw.print("AC");
        }
    } solve {
        String s = nextLine();
        int n = s.length();

        if (s.charAt(0) != 'A' || s.charAt(1) < 'a') {
            pw.print("WA");
            return;
        }
        boolean flag = false;
        for (int i = 2; i < n; i++) {
            if (s.charAt(i) < 'a') {
                if (flag || s.charAt(i) != 'C') {
                    pw.print("WA");
                    return;
                } else {
                    if (i == n - 1) {
                        pw.print("WA");
                        return;
                    }
                    flag = true;
                }
            }
        }
        if (!flag) {
            pw.print("WA");
        } else {
            pw.print("AC");
        }
    } String s = nextLine(); s nextLine() nextLine int n = s.length(); n s.length() s.length s if (s.charAt(0) != 'A' || s.charAt(1) < 'a') {
            pw.print("WA");
            return;
        } s.charAt(0) != 'A' || s.charAt(1) < 'a' s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' s.charAt(1) < 'a' s.charAt(1) s.charAt s 1 'a' {
            pw.print("WA");
            return;
        } pw.print("WA") pw.print pw "WA" return; boolean flag = false; flag false for (int i = 2; i < n; i++) {
            if (s.charAt(i) < 'a') {
                if (flag || s.charAt(i) != 'C') {
                    pw.print("WA");
                    return;
                } else {
                    if (i == n - 1) {
                        pw.print("WA");
                        return;
                    }
                    flag = true;
                }
            }
        } int i = 2; int i = 2; i 2 i < n i n i++ i++ i {
            if (s.charAt(i) < 'a') {
                if (flag || s.charAt(i) != 'C') {
                    pw.print("WA");
                    return;
                } else {
                    if (i == n - 1) {
                        pw.print("WA");
                        return;
                    }
                    flag = true;
                }
            }
        } {
            if (s.charAt(i) < 'a') {
                if (flag || s.charAt(i) != 'C') {
                    pw.print("WA");
                    return;
                } else {
                    if (i == n - 1) {
                        pw.print("WA");
                        return;
                    }
                    flag = true;
                }
            }
        } if (s.charAt(i) < 'a') {
                if (flag || s.charAt(i) != 'C') {
                    pw.print("WA");
                    return;
                } else {
                    if (i == n - 1) {
                        pw.print("WA");
                        return;
                    }
                    flag = true;
                }
            } s.charAt(i) < 'a' s.charAt(i) s.charAt s i 'a' {
                if (flag || s.charAt(i) != 'C') {
                    pw.print("WA");
                    return;
                } else {
                    if (i == n - 1) {
                        pw.print("WA");
                        return;
                    }
                    flag = true;
                }
            } if (flag || s.charAt(i) != 'C') {
                    pw.print("WA");
                    return;
                } else {
                    if (i == n - 1) {
                        pw.print("WA");
                        return;
                    }
                    flag = true;
                } flag || s.charAt(i) != 'C' flag s.charAt(i) != 'C' s.charAt(i) s.charAt s i 'C' {
                    pw.print("WA");
                    return;
                } pw.print("WA") pw.print pw "WA" return; {
                    if (i == n - 1) {
                        pw.print("WA");
                        return;
                    }
                    flag = true;
                } if (i == n - 1) {
                        pw.print("WA");
                        return;
                    } i == n - 1 i n - 1 n 1 {
                        pw.print("WA");
                        return;
                    } pw.print("WA") pw.print pw "WA" return; flag = true flag true if (!flag) {
            pw.print("WA");
        } else {
            pw.print("AC");
        } !flag flag {
            pw.print("WA");
        } pw.print("WA") pw.print pw "WA" {
            pw.print("AC");
        } pw.print("AC") pw.print pw "AC" public static void main(String args[]) throws IOException {
//        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
//        if (!oj) {
//            System.setIn(new FileInputStream("src/in.txt"));
//        }
        br = new BufferedReader(new InputStreamReader(System.in));
        st = new StreamTokenizer(br);
        pw = new PrintWriter(new OutputStreamWriter(System.out));
        st.ordinaryChar('\''); //指定单引号、双引号和注释符号是普通字符
        st.ordinaryChar('\"');
        st.ordinaryChar('/');

        long t = System.currentTimeMillis();
        solve();
//        if (!oj) {
//            pw.println("[" + (System.currentTimeMillis() - t) + "ms]");
//        }
        pw.flush();
    } main {
//        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
//        if (!oj) {
//            System.setIn(new FileInputStream("src/in.txt"));
//        }
        br = new BufferedReader(new InputStreamReader(System.in));
        st = new StreamTokenizer(br);
        pw = new PrintWriter(new OutputStreamWriter(System.out));
        st.ordinaryChar('\''); //指定单引号、双引号和注释符号是普通字符
        st.ordinaryChar('\"');
        st.ordinaryChar('/');

        long t = System.currentTimeMillis();
        solve();
//        if (!oj) {
//            pw.println("[" + (System.currentTimeMillis() - t) + "ms]");
//        }
        pw.flush();
    } br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) st = new StreamTokenizer(br) st new StreamTokenizer(br) pw = new PrintWriter(new OutputStreamWriter(System.out)) pw new PrintWriter(new OutputStreamWriter(System.out)) st.ordinaryChar('\'') st.ordinaryChar st '\'' st.ordinaryChar('\"') st.ordinaryChar st '\"' st.ordinaryChar('/') st.ordinaryChar st '/' long t = System.currentTimeMillis(); t System.currentTimeMillis() System.currentTimeMillis System solve() solve pw.flush() pw.flush pw String args[] args private static int nextInt() throws IOException {
        st.nextToken();
        return (int) st.nval;
    } nextInt {
        st.nextToken();
        return (int) st.nval;
    } st.nextToken() st.nextToken st return (int) st.nval; (int) st.nval st st.nval private static long nextLong() throws IOException {
        st.nextToken();
        return (long) st.nval;
    } nextLong {
        st.nextToken();
        return (long) st.nval;
    } st.nextToken() st.nextToken st return (long) st.nval; (long) st.nval st st.nval private static double nextDouble() throws IOException {
        st.nextToken();
        return st.nval;
    } nextDouble {
        st.nextToken();
        return st.nval;
    } st.nextToken() st.nextToken st return st.nval; st.nval st st.nval private static String[] nextSS(String reg) throws IOException {
        return br.readLine().split(reg);
    } nextSS {
        return br.readLine().split(reg);
    } return br.readLine().split(reg); br.readLine().split(reg) br.readLine().split br.readLine() br.readLine br reg String reg reg private static String nextLine() throws IOException {
        return br.readLine();
    } nextLine {
        return br.readLine();
    } return br.readLine(); br.readLine() br.readLine br public class Main {


    private static BufferedReader br;
    private static StreamTokenizer st;
    private static PrintWriter pw;

    private static void solve() throws IOException {
        String s = nextLine();
        int n = s.length();

        if (s.charAt(0) != 'A' || s.charAt(1) < 'a') {
            pw.print("WA");
            return;
        }
        boolean flag = false;
        for (int i = 2; i < n; i++) {
            if (s.charAt(i) < 'a') {
                if (flag || s.charAt(i) != 'C') {
                    pw.print("WA");
                    return;
                } else {
                    if (i == n - 1) {
                        pw.print("WA");
                        return;
                    }
                    flag = true;
                }
            }
        }
        if (!flag) {
            pw.print("WA");
        } else {
            pw.print("AC");
        }
    }

    public static void main(String args[]) throws IOException {
//        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
//        if (!oj) {
//            System.setIn(new FileInputStream("src/in.txt"));
//        }
        br = new BufferedReader(new InputStreamReader(System.in));
        st = new StreamTokenizer(br);
        pw = new PrintWriter(new OutputStreamWriter(System.out));
        st.ordinaryChar('\''); //指定单引号、双引号和注释符号是普通字符
        st.ordinaryChar('\"');
        st.ordinaryChar('/');

        long t = System.currentTimeMillis();
        solve();
//        if (!oj) {
//            pw.println("[" + (System.currentTimeMillis() - t) + "ms]");
//        }
        pw.flush();
    }


    private static int nextInt() throws IOException {
        st.nextToken();
        return (int) st.nval;
    }

    private static long nextLong() throws IOException {
        st.nextToken();
        return (long) st.nval;
    }

    private static double nextDouble() throws IOException {
        st.nextToken();
        return st.nval;
    }

    private static String[] nextSS(String reg) throws IOException {
        return br.readLine().split(reg);
    }

    private static String nextLine() throws IOException {
        return br.readLine();
    }
} public class Main {


    private static BufferedReader br;
    private static StreamTokenizer st;
    private static PrintWriter pw;

    private static void solve() throws IOException {
        String s = nextLine();
        int n = s.length();

        if (s.charAt(0) != 'A' || s.charAt(1) < 'a') {
            pw.print("WA");
            return;
        }
        boolean flag = false;
        for (int i = 2; i < n; i++) {
            if (s.charAt(i) < 'a') {
                if (flag || s.charAt(i) != 'C') {
                    pw.print("WA");
                    return;
                } else {
                    if (i == n - 1) {
                        pw.print("WA");
                        return;
                    }
                    flag = true;
                }
            }
        }
        if (!flag) {
            pw.print("WA");
        } else {
            pw.print("AC");
        }
    }

    public static void main(String args[]) throws IOException {
//        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
//        if (!oj) {
//            System.setIn(new FileInputStream("src/in.txt"));
//        }
        br = new BufferedReader(new InputStreamReader(System.in));
        st = new StreamTokenizer(br);
        pw = new PrintWriter(new OutputStreamWriter(System.out));
        st.ordinaryChar('\''); //指定单引号、双引号和注释符号是普通字符
        st.ordinaryChar('\"');
        st.ordinaryChar('/');

        long t = System.currentTimeMillis();
        solve();
//        if (!oj) {
//            pw.println("[" + (System.currentTimeMillis() - t) + "ms]");
//        }
        pw.flush();
    }


    private static int nextInt() throws IOException {
        st.nextToken();
        return (int) st.nval;
    }

    private static long nextLong() throws IOException {
        st.nextToken();
        return (long) st.nval;
    }

    private static double nextDouble() throws IOException {
        st.nextToken();
        return st.nval;
    }

    private static String[] nextSS(String reg) throws IOException {
        return br.readLine().split(reg);
    }

    private static String nextLine() throws IOException {
        return br.readLine();
    }
} Main
import java.io.*;

/**
 * Copyright © 2018 Chris. All rights reserved.
 *
 * @author Chris
 * 2018/6/23 11:55
 * @see meituan.n2018.Bturn
 */
public class Main {


    private static BufferedReader br;
    private static StreamTokenizer st;
    private static PrintWriter pw;

    private static void solve() throws IOException {
        String s = nextLine();
        int n = s.length();

        if (s.charAt(0) != 'A' || s.charAt(1) < 'a') {
            pw.print("WA");
            return;
        }
        boolean flag = false;
        for (int i = 2; i < n; i++) {
            if (s.charAt(i) < 'a') {
                if (flag || s.charAt(i) != 'C') {
                    pw.print("WA");
                    return;
                } else {
                    if (i == n - 1) {
                        pw.print("WA");
                        return;
                    }
                    flag = true;
                }
            }
        }
        if (!flag) {
            pw.print("WA");
        } else {
            pw.print("AC");
        }
    }

    public static void main(String args[]) throws IOException {
//        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
//        if (!oj) {
//            System.setIn(new FileInputStream("src/in.txt"));
//        }
        br = new BufferedReader(new InputStreamReader(System.in));
        st = new StreamTokenizer(br);
        pw = new PrintWriter(new OutputStreamWriter(System.out));
        st.ordinaryChar('\''); //指定单引号、双引号和注释符号是普通字符
        st.ordinaryChar('\"');
        st.ordinaryChar('/');

        long t = System.currentTimeMillis();
        solve();
//        if (!oj) {
//            pw.println("[" + (System.currentTimeMillis() - t) + "ms]");
//        }
        pw.flush();
    }


    private static int nextInt() throws IOException {
        st.nextToken();
        return (int) st.nval;
    }

    private static long nextLong() throws IOException {
        st.nextToken();
        return (long) st.nval;
    }

    private static double nextDouble() throws IOException {
        st.nextToken();
        return st.nval;
    }

    private static String[] nextSS(String reg) throws IOException {
        return br.readLine().split(reg);
    }

    private static String nextLine() throws IOException {
        return br.readLine();
    }
}