import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author hakamada
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC104_2 solver = new ABC104_2();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC104_2 {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String SS = in.next();
            int cexisit = 0;
            for (int i = 0; i < SS.length(); i++) {
                if (i == 0) {
                    if (SS.charAt(i) != 'A') {
                        out.println("WA");
                        return;
                    }
                } else if (i >= 2 && i < (SS.length() - 1)) {
                    if (SS.charAt(i) == 'C') {
                        if (cexisit != 0) {
                            out.println("WA");
                            return;
                        } else {
                            cexisit = i;
                        }
                    } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                        out.println("WA");
                        return;
                    }
                } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                    out.println("WA");
                    return;
                }
            }
            if (cexisit == 0) {
                out.println("WA");
            } else {
                out.println("AC");
            }
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC104_2 solver = new ABC104_2();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC104_2 {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String SS = in.next();
            int cexisit = 0;
            for (int i = 0; i < SS.length(); i++) {
                if (i == 0) {
                    if (SS.charAt(i) != 'A') {
                        out.println("WA");
                        return;
                    }
                } else if (i >= 2 && i < (SS.length() - 1)) {
                    if (SS.charAt(i) == 'C') {
                        if (cexisit != 0) {
                            out.println("WA");
                            return;
                        } else {
                            cexisit = i;
                        }
                    } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                        out.println("WA");
                        return;
                    }
                } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                    out.println("WA");
                    return;
                }
            }
            if (cexisit == 0) {
                out.println("WA");
            } else {
                out.println("AC");
            }
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC104_2 solver = new ABC104_2();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC104_2 solver = new ABC104_2();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) ABC104_2 solver = new ABC104_2(); solver new ABC104_2() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class ABC104_2 {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String SS = in.next();
            int cexisit = 0;
            for (int i = 0; i < SS.length(); i++) {
                if (i == 0) {
                    if (SS.charAt(i) != 'A') {
                        out.println("WA");
                        return;
                    }
                } else if (i >= 2 && i < (SS.length() - 1)) {
                    if (SS.charAt(i) == 'C') {
                        if (cexisit != 0) {
                            out.println("WA");
                            return;
                        } else {
                            cexisit = i;
                        }
                    } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                        out.println("WA");
                        return;
                    }
                } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                    out.println("WA");
                    return;
                }
            }
            if (cexisit == 0) {
                out.println("WA");
            } else {
                out.println("AC");
            }
        }

    } ABC104_2 public void solve(int testNumber, Scanner in, PrintWriter out) {
            String SS = in.next();
            int cexisit = 0;
            for (int i = 0; i < SS.length(); i++) {
                if (i == 0) {
                    if (SS.charAt(i) != 'A') {
                        out.println("WA");
                        return;
                    }
                } else if (i >= 2 && i < (SS.length() - 1)) {
                    if (SS.charAt(i) == 'C') {
                        if (cexisit != 0) {
                            out.println("WA");
                            return;
                        } else {
                            cexisit = i;
                        }
                    } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                        out.println("WA");
                        return;
                    }
                } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                    out.println("WA");
                    return;
                }
            }
            if (cexisit == 0) {
                out.println("WA");
            } else {
                out.println("AC");
            }
        } solve {
            String SS = in.next();
            int cexisit = 0;
            for (int i = 0; i < SS.length(); i++) {
                if (i == 0) {
                    if (SS.charAt(i) != 'A') {
                        out.println("WA");
                        return;
                    }
                } else if (i >= 2 && i < (SS.length() - 1)) {
                    if (SS.charAt(i) == 'C') {
                        if (cexisit != 0) {
                            out.println("WA");
                            return;
                        } else {
                            cexisit = i;
                        }
                    } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                        out.println("WA");
                        return;
                    }
                } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                    out.println("WA");
                    return;
                }
            }
            if (cexisit == 0) {
                out.println("WA");
            } else {
                out.println("AC");
            }
        } String SS = in.next(); SS in.next() in.next in int cexisit = 0; cexisit 0 for (int i = 0; i < SS.length(); i++) {
                if (i == 0) {
                    if (SS.charAt(i) != 'A') {
                        out.println("WA");
                        return;
                    }
                } else if (i >= 2 && i < (SS.length() - 1)) {
                    if (SS.charAt(i) == 'C') {
                        if (cexisit != 0) {
                            out.println("WA");
                            return;
                        } else {
                            cexisit = i;
                        }
                    } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                        out.println("WA");
                        return;
                    }
                } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                    out.println("WA");
                    return;
                }
            } int i = 0; int i = 0; i 0 i < SS.length() i SS.length() SS.length SS i++ i++ i {
                if (i == 0) {
                    if (SS.charAt(i) != 'A') {
                        out.println("WA");
                        return;
                    }
                } else if (i >= 2 && i < (SS.length() - 1)) {
                    if (SS.charAt(i) == 'C') {
                        if (cexisit != 0) {
                            out.println("WA");
                            return;
                        } else {
                            cexisit = i;
                        }
                    } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                        out.println("WA");
                        return;
                    }
                } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                    out.println("WA");
                    return;
                }
            } {
                if (i == 0) {
                    if (SS.charAt(i) != 'A') {
                        out.println("WA");
                        return;
                    }
                } else if (i >= 2 && i < (SS.length() - 1)) {
                    if (SS.charAt(i) == 'C') {
                        if (cexisit != 0) {
                            out.println("WA");
                            return;
                        } else {
                            cexisit = i;
                        }
                    } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                        out.println("WA");
                        return;
                    }
                } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                    out.println("WA");
                    return;
                }
            } if (i == 0) {
                    if (SS.charAt(i) != 'A') {
                        out.println("WA");
                        return;
                    }
                } else if (i >= 2 && i < (SS.length() - 1)) {
                    if (SS.charAt(i) == 'C') {
                        if (cexisit != 0) {
                            out.println("WA");
                            return;
                        } else {
                            cexisit = i;
                        }
                    } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                        out.println("WA");
                        return;
                    }
                } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                    out.println("WA");
                    return;
                } i == 0 i 0 {
                    if (SS.charAt(i) != 'A') {
                        out.println("WA");
                        return;
                    }
                } if (SS.charAt(i) != 'A') {
                        out.println("WA");
                        return;
                    } SS.charAt(i) != 'A' SS.charAt(i) SS.charAt SS i 'A' {
                        out.println("WA");
                        return;
                    } out.println("WA") out.println out "WA" return; if (i >= 2 && i < (SS.length() - 1)) {
                    if (SS.charAt(i) == 'C') {
                        if (cexisit != 0) {
                            out.println("WA");
                            return;
                        } else {
                            cexisit = i;
                        }
                    } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                        out.println("WA");
                        return;
                    }
                } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                    out.println("WA");
                    return;
                } i >= 2 && i < (SS.length() - 1) i >= 2 i 2 i < (SS.length() - 1) i (SS.length() - 1) SS.length() SS.length SS 1 {
                    if (SS.charAt(i) == 'C') {
                        if (cexisit != 0) {
                            out.println("WA");
                            return;
                        } else {
                            cexisit = i;
                        }
                    } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                        out.println("WA");
                        return;
                    }
                } if (SS.charAt(i) == 'C') {
                        if (cexisit != 0) {
                            out.println("WA");
                            return;
                        } else {
                            cexisit = i;
                        }
                    } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                        out.println("WA");
                        return;
                    } SS.charAt(i) == 'C' SS.charAt(i) SS.charAt SS i 'C' {
                        if (cexisit != 0) {
                            out.println("WA");
                            return;
                        } else {
                            cexisit = i;
                        }
                    } if (cexisit != 0) {
                            out.println("WA");
                            return;
                        } else {
                            cexisit = i;
                        } cexisit != 0 cexisit 0 {
                            out.println("WA");
                            return;
                        } out.println("WA") out.println out "WA" return; {
                            cexisit = i;
                        } cexisit = i cexisit i if (Character.isUpperCase(SS.charAt(i)) == true) {
                        out.println("WA");
                        return;
                    } Character.isUpperCase(SS.charAt(i)) == true Character.isUpperCase(SS.charAt(i)) Character.isUpperCase Character SS.charAt(i) SS.charAt SS i true {
                        out.println("WA");
                        return;
                    } out.println("WA") out.println out "WA" return; if (Character.isUpperCase(SS.charAt(i)) == true) {
                    out.println("WA");
                    return;
                } Character.isUpperCase(SS.charAt(i)) == true Character.isUpperCase(SS.charAt(i)) Character.isUpperCase Character SS.charAt(i) SS.charAt SS i true {
                    out.println("WA");
                    return;
                } out.println("WA") out.println out "WA" return; if (cexisit == 0) {
                out.println("WA");
            } else {
                out.println("AC");
            } cexisit == 0 cexisit 0 {
                out.println("WA");
            } out.println("WA") out.println out "WA" {
                out.println("AC");
            } out.println("AC") out.println out "AC" int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC104_2 solver = new ABC104_2();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC104_2 {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String SS = in.next();
            int cexisit = 0;
            for (int i = 0; i < SS.length(); i++) {
                if (i == 0) {
                    if (SS.charAt(i) != 'A') {
                        out.println("WA");
                        return;
                    }
                } else if (i >= 2 && i < (SS.length() - 1)) {
                    if (SS.charAt(i) == 'C') {
                        if (cexisit != 0) {
                            out.println("WA");
                            return;
                        } else {
                            cexisit = i;
                        }
                    } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                        out.println("WA");
                        return;
                    }
                } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                    out.println("WA");
                    return;
                }
            }
            if (cexisit == 0) {
                out.println("WA");
            } else {
                out.println("AC");
            }
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC104_2 solver = new ABC104_2();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC104_2 {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String SS = in.next();
            int cexisit = 0;
            for (int i = 0; i < SS.length(); i++) {
                if (i == 0) {
                    if (SS.charAt(i) != 'A') {
                        out.println("WA");
                        return;
                    }
                } else if (i >= 2 && i < (SS.length() - 1)) {
                    if (SS.charAt(i) == 'C') {
                        if (cexisit != 0) {
                            out.println("WA");
                            return;
                        } else {
                            cexisit = i;
                        }
                    } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                        out.println("WA");
                        return;
                    }
                } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                    out.println("WA");
                    return;
                }
            }
            if (cexisit == 0) {
                out.println("WA");
            } else {
                out.println("AC");
            }
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author hakamada
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ABC104_2 solver = new ABC104_2();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC104_2 {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String SS = in.next();
            int cexisit = 0;
            for (int i = 0; i < SS.length(); i++) {
                if (i == 0) {
                    if (SS.charAt(i) != 'A') {
                        out.println("WA");
                        return;
                    }
                } else if (i >= 2 && i < (SS.length() - 1)) {
                    if (SS.charAt(i) == 'C') {
                        if (cexisit != 0) {
                            out.println("WA");
                            return;
                        } else {
                            cexisit = i;
                        }
                    } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                        out.println("WA");
                        return;
                    }
                } else if (Character.isUpperCase(SS.charAt(i)) == true) {
                    out.println("WA");
                    return;
                }
            }
            if (cexisit == 0) {
                out.println("WA");
            } else {
                out.println("AC");
            }
        }

    }
}

