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
 */
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_B solver = new ABC104_B();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC104_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String s = in.next();
            String ans = "AC";
            if (s.charAt(0) != 'A') {
                ans = "WA";
            }

            String sub = s.substring(2, s.length() - 1);

            int cnt = 0;
            for (char c : sub.toCharArray()) {
                if (c == 'C') {
                    cnt++;
                }
            }
            if (cnt != 1) {
                ans = "WA";
            }


            for (char c : s.toCharArray()) {
                if (c != 'A' && c != 'C') {
                    if (!Character.isLowerCase(c)) {
                        ans = "WA";
                    }
                }
            }


            out.print(ans);

        }

    }
}
 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_B solver = new ABC104_B();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC104_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String s = in.next();
            String ans = "AC";
            if (s.charAt(0) != 'A') {
                ans = "WA";
            }

            String sub = s.substring(2, s.length() - 1);

            int cnt = 0;
            for (char c : sub.toCharArray()) {
                if (c == 'C') {
                    cnt++;
                }
            }
            if (cnt != 1) {
                ans = "WA";
            }


            for (char c : s.toCharArray()) {
                if (c != 'A' && c != 'C') {
                    if (!Character.isLowerCase(c)) {
                        ans = "WA";
                    }
                }
            }


            out.print(ans);

        }

    }
} 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_B solver = new ABC104_B();
        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_B solver = new ABC104_B();
        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_B solver = new ABC104_B(); solver new ABC104_B() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class ABC104_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String s = in.next();
            String ans = "AC";
            if (s.charAt(0) != 'A') {
                ans = "WA";
            }

            String sub = s.substring(2, s.length() - 1);

            int cnt = 0;
            for (char c : sub.toCharArray()) {
                if (c == 'C') {
                    cnt++;
                }
            }
            if (cnt != 1) {
                ans = "WA";
            }


            for (char c : s.toCharArray()) {
                if (c != 'A' && c != 'C') {
                    if (!Character.isLowerCase(c)) {
                        ans = "WA";
                    }
                }
            }


            out.print(ans);

        }

    } ABC104_B public void solve(int testNumber, Scanner in, PrintWriter out) {
            String s = in.next();
            String ans = "AC";
            if (s.charAt(0) != 'A') {
                ans = "WA";
            }

            String sub = s.substring(2, s.length() - 1);

            int cnt = 0;
            for (char c : sub.toCharArray()) {
                if (c == 'C') {
                    cnt++;
                }
            }
            if (cnt != 1) {
                ans = "WA";
            }


            for (char c : s.toCharArray()) {
                if (c != 'A' && c != 'C') {
                    if (!Character.isLowerCase(c)) {
                        ans = "WA";
                    }
                }
            }


            out.print(ans);

        } solve {
            String s = in.next();
            String ans = "AC";
            if (s.charAt(0) != 'A') {
                ans = "WA";
            }

            String sub = s.substring(2, s.length() - 1);

            int cnt = 0;
            for (char c : sub.toCharArray()) {
                if (c == 'C') {
                    cnt++;
                }
            }
            if (cnt != 1) {
                ans = "WA";
            }


            for (char c : s.toCharArray()) {
                if (c != 'A' && c != 'C') {
                    if (!Character.isLowerCase(c)) {
                        ans = "WA";
                    }
                }
            }


            out.print(ans);

        } String s = in.next(); s in.next() in.next in String ans = "AC"; ans "AC" if (s.charAt(0) != 'A') {
                ans = "WA";
            } s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' {
                ans = "WA";
            } ans = "WA" ans "WA" String sub = s.substring(2, s.length() - 1); sub s.substring(2, s.length() - 1) s.substring s 2 s.length() - 1 s.length() s.length s 1 int cnt = 0; cnt 0 for (char c : sub.toCharArray()) {
                if (c == 'C') {
                    cnt++;
                }
            } char c sub.toCharArray() sub.toCharArray sub {
                if (c == 'C') {
                    cnt++;
                }
            } {
                if (c == 'C') {
                    cnt++;
                }
            } if (c == 'C') {
                    cnt++;
                } c == 'C' c 'C' {
                    cnt++;
                } cnt++ cnt if (cnt != 1) {
                ans = "WA";
            } cnt != 1 cnt 1 {
                ans = "WA";
            } ans = "WA" ans "WA" for (char c : s.toCharArray()) {
                if (c != 'A' && c != 'C') {
                    if (!Character.isLowerCase(c)) {
                        ans = "WA";
                    }
                }
            } char c s.toCharArray() s.toCharArray s {
                if (c != 'A' && c != 'C') {
                    if (!Character.isLowerCase(c)) {
                        ans = "WA";
                    }
                }
            } {
                if (c != 'A' && c != 'C') {
                    if (!Character.isLowerCase(c)) {
                        ans = "WA";
                    }
                }
            } if (c != 'A' && c != 'C') {
                    if (!Character.isLowerCase(c)) {
                        ans = "WA";
                    }
                } c != 'A' && c != 'C' c != 'A' c 'A' c != 'C' c 'C' {
                    if (!Character.isLowerCase(c)) {
                        ans = "WA";
                    }
                } if (!Character.isLowerCase(c)) {
                        ans = "WA";
                    } !Character.isLowerCase(c) Character.isLowerCase(c) Character.isLowerCase Character c {
                        ans = "WA";
                    } ans = "WA" ans "WA" out.print(ans) out.print out ans 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_B solver = new ABC104_B();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC104_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String s = in.next();
            String ans = "AC";
            if (s.charAt(0) != 'A') {
                ans = "WA";
            }

            String sub = s.substring(2, s.length() - 1);

            int cnt = 0;
            for (char c : sub.toCharArray()) {
                if (c == 'C') {
                    cnt++;
                }
            }
            if (cnt != 1) {
                ans = "WA";
            }


            for (char c : s.toCharArray()) {
                if (c != 'A' && c != 'C') {
                    if (!Character.isLowerCase(c)) {
                        ans = "WA";
                    }
                }
            }


            out.print(ans);

        }

    }
} 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_B solver = new ABC104_B();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC104_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String s = in.next();
            String ans = "AC";
            if (s.charAt(0) != 'A') {
                ans = "WA";
            }

            String sub = s.substring(2, s.length() - 1);

            int cnt = 0;
            for (char c : sub.toCharArray()) {
                if (c == 'C') {
                    cnt++;
                }
            }
            if (cnt != 1) {
                ans = "WA";
            }


            for (char c : s.toCharArray()) {
                if (c != 'A' && c != 'C') {
                    if (!Character.isLowerCase(c)) {
                        ans = "WA";
                    }
                }
            }


            out.print(ans);

        }

    }
} 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
 */
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_B solver = new ABC104_B();
        solver.solve(1, in, out);
        out.close();
    }

    static class ABC104_B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            String s = in.next();
            String ans = "AC";
            if (s.charAt(0) != 'A') {
                ans = "WA";
            }

            String sub = s.substring(2, s.length() - 1);

            int cnt = 0;
            for (char c : sub.toCharArray()) {
                if (c == 'C') {
                    cnt++;
                }
            }
            if (cnt != 1) {
                ans = "WA";
            }


            for (char c : s.toCharArray()) {
                if (c != 'A' && c != 'C') {
                    if (!Character.isLowerCase(c)) {
                        ans = "WA";
                    }
                }
            }


            out.print(ans);

        }

    }
}

