import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

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

    static class BAcCepted {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            String s = in.next();
            boolean answer = valid(s);

            out.println(answer ? "AC" : "WA");
        }

        private boolean valid(String s) {
            if (s.charAt(0) != 'A')
                return false;

            int c = 0;
            for (int i = 2; i <= (s.length() - 2); i++) {
                if (s.charAt(i) == 'C')
                    c++;
            }
            if (c != 1)
                return false;

            int notLower = 0;
            for (int i = 0; i < s.length(); i++) {
                if (!(s.charAt(i) <= 'z' && s.charAt(i) >= 'a'))
                    notLower++;
            }

            if (notLower != 2)
                return false;

            return true;
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

    }
}
 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.StringTokenizer; StringTokenizer java.util import java.io.IOException; IOException java.io import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.InputStream; InputStream java.io public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BAcCepted solver = new BAcCepted();
        solver.solve(1, in, out);
        out.close();
    }

    static class BAcCepted {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            String s = in.next();
            boolean answer = valid(s);

            out.println(answer ? "AC" : "WA");
        }

        private boolean valid(String s) {
            if (s.charAt(0) != 'A')
                return false;

            int c = 0;
            for (int i = 2; i <= (s.length() - 2); i++) {
                if (s.charAt(i) == 'C')
                    c++;
            }
            if (c != 1)
                return false;

            int notLower = 0;
            for (int i = 0; i < s.length(); i++) {
                if (!(s.charAt(i) <= 'z' && s.charAt(i) >= 'a'))
                    notLower++;
            }

            if (notLower != 2)
                return false;

            return true;
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BAcCepted solver = new BAcCepted();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BAcCepted solver = new BAcCepted();
        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 InputReader in = new InputReader(inputStream); in new InputReader(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) BAcCepted solver = new BAcCepted(); solver new BAcCepted() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class BAcCepted {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            String s = in.next();
            boolean answer = valid(s);

            out.println(answer ? "AC" : "WA");
        }

        private boolean valid(String s) {
            if (s.charAt(0) != 'A')
                return false;

            int c = 0;
            for (int i = 2; i <= (s.length() - 2); i++) {
                if (s.charAt(i) == 'C')
                    c++;
            }
            if (c != 1)
                return false;

            int notLower = 0;
            for (int i = 0; i < s.length(); i++) {
                if (!(s.charAt(i) <= 'z' && s.charAt(i) >= 'a'))
                    notLower++;
            }

            if (notLower != 2)
                return false;

            return true;
        }

    } BAcCepted public void solve(int testNumber, InputReader in, PrintWriter out) {
            String s = in.next();
            boolean answer = valid(s);

            out.println(answer ? "AC" : "WA");
        } solve {
            String s = in.next();
            boolean answer = valid(s);

            out.println(answer ? "AC" : "WA");
        } String s = in.next(); s in.next() in.next in boolean answer = valid(s); answer valid(s) valid s out.println(answer ? "AC" : "WA") out.println out answer ? "AC" : "WA" answer "AC" "WA" int testNumber testNumber InputReader in in PrintWriter out out private boolean valid(String s) {
            if (s.charAt(0) != 'A')
                return false;

            int c = 0;
            for (int i = 2; i <= (s.length() - 2); i++) {
                if (s.charAt(i) == 'C')
                    c++;
            }
            if (c != 1)
                return false;

            int notLower = 0;
            for (int i = 0; i < s.length(); i++) {
                if (!(s.charAt(i) <= 'z' && s.charAt(i) >= 'a'))
                    notLower++;
            }

            if (notLower != 2)
                return false;

            return true;
        } valid {
            if (s.charAt(0) != 'A')
                return false;

            int c = 0;
            for (int i = 2; i <= (s.length() - 2); i++) {
                if (s.charAt(i) == 'C')
                    c++;
            }
            if (c != 1)
                return false;

            int notLower = 0;
            for (int i = 0; i < s.length(); i++) {
                if (!(s.charAt(i) <= 'z' && s.charAt(i) >= 'a'))
                    notLower++;
            }

            if (notLower != 2)
                return false;

            return true;
        } if (s.charAt(0) != 'A')
                return false; s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' return false; false 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 if (c != 1)
                return false; c != 1 c 1 return false; false int notLower = 0; notLower 0 for (int i = 0; i < s.length(); i++) {
                if (!(s.charAt(i) <= 'z' && s.charAt(i) >= 'a'))
                    notLower++;
            } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
                if (!(s.charAt(i) <= 'z' && s.charAt(i) >= 'a'))
                    notLower++;
            } {
                if (!(s.charAt(i) <= 'z' && s.charAt(i) >= 'a'))
                    notLower++;
            } if (!(s.charAt(i) <= 'z' && s.charAt(i) >= 'a'))
                    notLower++; !(s.charAt(i) <= 'z' && s.charAt(i) >= 'a') (s.charAt(i) <= 'z' && s.charAt(i) >= 'a') s.charAt(i) <= 'z' s.charAt(i) s.charAt s i 'z' s.charAt(i) >= 'a' s.charAt(i) s.charAt s i 'a' notLower++ notLower if (notLower != 2)
                return false; notLower != 2 notLower 2 return false; false return true; true String s s static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

    } InputReader public BufferedReader reader; reader public StringTokenizer tokenizer; tokenizer public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        } InputReader {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        } reader = new BufferedReader(new InputStreamReader(stream), 32768) reader new BufferedReader(new InputStreamReader(stream), 32768) tokenizer = null tokenizer null InputStream stream stream public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } next {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } IOException e {
                    throw new RuntimeException(e);
                } throw new RuntimeException(e); new RuntimeException(e) {
                    tokenizer = new StringTokenizer(reader.readLine());
                } tokenizer = new StringTokenizer(reader.readLine()) tokenizer new StringTokenizer(reader.readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BAcCepted solver = new BAcCepted();
        solver.solve(1, in, out);
        out.close();
    }

    static class BAcCepted {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            String s = in.next();
            boolean answer = valid(s);

            out.println(answer ? "AC" : "WA");
        }

        private boolean valid(String s) {
            if (s.charAt(0) != 'A')
                return false;

            int c = 0;
            for (int i = 2; i <= (s.length() - 2); i++) {
                if (s.charAt(i) == 'C')
                    c++;
            }
            if (c != 1)
                return false;

            int notLower = 0;
            for (int i = 0; i < s.length(); i++) {
                if (!(s.charAt(i) <= 'z' && s.charAt(i) >= 'a'))
                    notLower++;
            }

            if (notLower != 2)
                return false;

            return true;
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

    static class BAcCepted {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            String s = in.next();
            boolean answer = valid(s);

            out.println(answer ? "AC" : "WA");
        }

        private boolean valid(String s) {
            if (s.charAt(0) != 'A')
                return false;

            int c = 0;
            for (int i = 2; i <= (s.length() - 2); i++) {
                if (s.charAt(i) == 'C')
                    c++;
            }
            if (c != 1)
                return false;

            int notLower = 0;
            for (int i = 0; i < s.length(); i++) {
                if (!(s.charAt(i) <= 'z' && s.charAt(i) >= 'a'))
                    notLower++;
            }

            if (notLower != 2)
                return false;

            return true;
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

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

    static class BAcCepted {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            String s = in.next();
            boolean answer = valid(s);

            out.println(answer ? "AC" : "WA");
        }

        private boolean valid(String s) {
            if (s.charAt(0) != 'A')
                return false;

            int c = 0;
            for (int i = 2; i <= (s.length() - 2); i++) {
                if (s.charAt(i) == 'C')
                    c++;
            }
            if (c != 1)
                return false;

            int notLower = 0;
            for (int i = 0; i < s.length(); i++) {
                if (!(s.charAt(i) <= 'z' && s.charAt(i) >= 'a'))
                    notLower++;
            }

            if (notLower != 2)
                return false;

            return true;
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

    }
}

