import java.io.IOException;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
        try (Scanner sc = new Scanner(System.in);) {
            // shirai_r
            
            String a = sc.next();
            String[] b = a.split("");

            String aUpper = a.toUpperCase();
            String[] c = aUpper.split("");

            boolean flag = false;

            int countC = 0;
            for (String st : b) {
                if (st.equals("C")) {
                    countC++;
                }
            }

            int countUpper = 0;
            for (int i = 0; i < c.length; i++) {
                if (b[i].equals(c[i])) {
                    countUpper++;
                }
            }

            boolean cc = false;
            for (int i = 2; i < c.length-1; i++) {
                if (b[i].equals("C")) {
                    cc = true;
                }
            }


            if (b[0].equals("A")) {
                if (cc) {
                    if (countC == 1) {
                        if (countUpper == 2) {
                            flag = true;
                        }
                    }
                }
            }
            System.out.println(flag ? "AC" : "WA");
        }

    }

} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
        try (Scanner sc = new Scanner(System.in);) {
            // shirai_r
            
            String a = sc.next();
            String[] b = a.split("");

            String aUpper = a.toUpperCase();
            String[] c = aUpper.split("");

            boolean flag = false;

            int countC = 0;
            for (String st : b) {
                if (st.equals("C")) {
                    countC++;
                }
            }

            int countUpper = 0;
            for (int i = 0; i < c.length; i++) {
                if (b[i].equals(c[i])) {
                    countUpper++;
                }
            }

            boolean cc = false;
            for (int i = 2; i < c.length-1; i++) {
                if (b[i].equals("C")) {
                    cc = true;
                }
            }


            if (b[0].equals("A")) {
                if (cc) {
                    if (countC == 1) {
                        if (countUpper == 2) {
                            flag = true;
                        }
                    }
                }
            }
            System.out.println(flag ? "AC" : "WA");
        }

    }

} Main public static void main(String[] args) throws NumberFormatException, IOException {
        try (Scanner sc = new Scanner(System.in);) {
            // shirai_r
            
            String a = sc.next();
            String[] b = a.split("");

            String aUpper = a.toUpperCase();
            String[] c = aUpper.split("");

            boolean flag = false;

            int countC = 0;
            for (String st : b) {
                if (st.equals("C")) {
                    countC++;
                }
            }

            int countUpper = 0;
            for (int i = 0; i < c.length; i++) {
                if (b[i].equals(c[i])) {
                    countUpper++;
                }
            }

            boolean cc = false;
            for (int i = 2; i < c.length-1; i++) {
                if (b[i].equals("C")) {
                    cc = true;
                }
            }


            if (b[0].equals("A")) {
                if (cc) {
                    if (countC == 1) {
                        if (countUpper == 2) {
                            flag = true;
                        }
                    }
                }
            }
            System.out.println(flag ? "AC" : "WA");
        }

    } main {
        try (Scanner sc = new Scanner(System.in);) {
            // shirai_r
            
            String a = sc.next();
            String[] b = a.split("");

            String aUpper = a.toUpperCase();
            String[] c = aUpper.split("");

            boolean flag = false;

            int countC = 0;
            for (String st : b) {
                if (st.equals("C")) {
                    countC++;
                }
            }

            int countUpper = 0;
            for (int i = 0; i < c.length; i++) {
                if (b[i].equals(c[i])) {
                    countUpper++;
                }
            }

            boolean cc = false;
            for (int i = 2; i < c.length-1; i++) {
                if (b[i].equals("C")) {
                    cc = true;
                }
            }


            if (b[0].equals("A")) {
                if (cc) {
                    if (countC == 1) {
                        if (countUpper == 2) {
                            flag = true;
                        }
                    }
                }
            }
            System.out.println(flag ? "AC" : "WA");
        }

    } try (Scanner sc = new Scanner(System.in);) {
            // shirai_r
            
            String a = sc.next();
            String[] b = a.split("");

            String aUpper = a.toUpperCase();
            String[] c = aUpper.split("");

            boolean flag = false;

            int countC = 0;
            for (String st : b) {
                if (st.equals("C")) {
                    countC++;
                }
            }

            int countUpper = 0;
            for (int i = 0; i < c.length; i++) {
                if (b[i].equals(c[i])) {
                    countUpper++;
                }
            }

            boolean cc = false;
            for (int i = 2; i < c.length-1; i++) {
                if (b[i].equals("C")) {
                    cc = true;
                }
            }


            if (b[0].equals("A")) {
                if (cc) {
                    if (countC == 1) {
                        if (countUpper == 2) {
                            flag = true;
                        }
                    }
                }
            }
            System.out.println(flag ? "AC" : "WA");
        } {
            // shirai_r
            
            String a = sc.next();
            String[] b = a.split("");

            String aUpper = a.toUpperCase();
            String[] c = aUpper.split("");

            boolean flag = false;

            int countC = 0;
            for (String st : b) {
                if (st.equals("C")) {
                    countC++;
                }
            }

            int countUpper = 0;
            for (int i = 0; i < c.length; i++) {
                if (b[i].equals(c[i])) {
                    countUpper++;
                }
            }

            boolean cc = false;
            for (int i = 2; i < c.length-1; i++) {
                if (b[i].equals("C")) {
                    cc = true;
                }
            }


            if (b[0].equals("A")) {
                if (cc) {
                    if (countC == 1) {
                        if (countUpper == 2) {
                            flag = true;
                        }
                    }
                }
            }
            System.out.println(flag ? "AC" : "WA");
        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc String[] b = a.split(""); b a.split("") a.split a "" String aUpper = a.toUpperCase(); aUpper a.toUpperCase() a.toUpperCase a String[] c = aUpper.split(""); c aUpper.split("") aUpper.split aUpper "" boolean flag = false; flag false int countC = 0; countC 0 for (String st : b) {
                if (st.equals("C")) {
                    countC++;
                }
            } String st b {
                if (st.equals("C")) {
                    countC++;
                }
            } {
                if (st.equals("C")) {
                    countC++;
                }
            } if (st.equals("C")) {
                    countC++;
                } st.equals("C") st.equals st "C" {
                    countC++;
                } countC++ countC int countUpper = 0; countUpper 0 for (int i = 0; i < c.length; i++) {
                if (b[i].equals(c[i])) {
                    countUpper++;
                }
            } int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
                if (b[i].equals(c[i])) {
                    countUpper++;
                }
            } {
                if (b[i].equals(c[i])) {
                    countUpper++;
                }
            } if (b[i].equals(c[i])) {
                    countUpper++;
                } b[i].equals(c[i]) b[i].equals b[i] b i c[i] c i {
                    countUpper++;
                } countUpper++ countUpper boolean cc = false; cc false for (int i = 2; i < c.length-1; i++) {
                if (b[i].equals("C")) {
                    cc = true;
                }
            } int i = 2; int i = 2; i 2 i < c.length-1 i c.length-1 c.length c c.length 1 i++ i++ i {
                if (b[i].equals("C")) {
                    cc = true;
                }
            } {
                if (b[i].equals("C")) {
                    cc = true;
                }
            } if (b[i].equals("C")) {
                    cc = true;
                } b[i].equals("C") b[i].equals b[i] b i "C" {
                    cc = true;
                } cc = true cc true if (b[0].equals("A")) {
                if (cc) {
                    if (countC == 1) {
                        if (countUpper == 2) {
                            flag = true;
                        }
                    }
                }
            } b[0].equals("A") b[0].equals b[0] b 0 "A" {
                if (cc) {
                    if (countC == 1) {
                        if (countUpper == 2) {
                            flag = true;
                        }
                    }
                }
            } if (cc) {
                    if (countC == 1) {
                        if (countUpper == 2) {
                            flag = true;
                        }
                    }
                } cc {
                    if (countC == 1) {
                        if (countUpper == 2) {
                            flag = true;
                        }
                    }
                } if (countC == 1) {
                        if (countUpper == 2) {
                            flag = true;
                        }
                    } countC == 1 countC 1 {
                        if (countUpper == 2) {
                            flag = true;
                        }
                    } if (countUpper == 2) {
                            flag = true;
                        } countUpper == 2 countUpper 2 {
                            flag = true;
                        } flag = true flag true System.out.println(flag ? "AC" : "WA") System.out.println System.out System System.out flag ? "AC" : "WA" flag "AC" "WA" String[] args args public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
        try (Scanner sc = new Scanner(System.in);) {
            // shirai_r
            
            String a = sc.next();
            String[] b = a.split("");

            String aUpper = a.toUpperCase();
            String[] c = aUpper.split("");

            boolean flag = false;

            int countC = 0;
            for (String st : b) {
                if (st.equals("C")) {
                    countC++;
                }
            }

            int countUpper = 0;
            for (int i = 0; i < c.length; i++) {
                if (b[i].equals(c[i])) {
                    countUpper++;
                }
            }

            boolean cc = false;
            for (int i = 2; i < c.length-1; i++) {
                if (b[i].equals("C")) {
                    cc = true;
                }
            }


            if (b[0].equals("A")) {
                if (cc) {
                    if (countC == 1) {
                        if (countUpper == 2) {
                            flag = true;
                        }
                    }
                }
            }
            System.out.println(flag ? "AC" : "WA");
        }

    }

} public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
        try (Scanner sc = new Scanner(System.in);) {
            // shirai_r
            
            String a = sc.next();
            String[] b = a.split("");

            String aUpper = a.toUpperCase();
            String[] c = aUpper.split("");

            boolean flag = false;

            int countC = 0;
            for (String st : b) {
                if (st.equals("C")) {
                    countC++;
                }
            }

            int countUpper = 0;
            for (int i = 0; i < c.length; i++) {
                if (b[i].equals(c[i])) {
                    countUpper++;
                }
            }

            boolean cc = false;
            for (int i = 2; i < c.length-1; i++) {
                if (b[i].equals("C")) {
                    cc = true;
                }
            }


            if (b[0].equals("A")) {
                if (cc) {
                    if (countC == 1) {
                        if (countUpper == 2) {
                            flag = true;
                        }
                    }
                }
            }
            System.out.println(flag ? "AC" : "WA");
        }

    }

} Main
import java.io.IOException;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws NumberFormatException, IOException {
        try (Scanner sc = new Scanner(System.in);) {
            // shirai_r
            
            String a = sc.next();
            String[] b = a.split("");

            String aUpper = a.toUpperCase();
            String[] c = aUpper.split("");

            boolean flag = false;

            int countC = 0;
            for (String st : b) {
                if (st.equals("C")) {
                    countC++;
                }
            }

            int countUpper = 0;
            for (int i = 0; i < c.length; i++) {
                if (b[i].equals(c[i])) {
                    countUpper++;
                }
            }

            boolean cc = false;
            for (int i = 2; i < c.length-1; i++) {
                if (b[i].equals("C")) {
                    cc = true;
                }
            }


            if (b[0].equals("A")) {
                if (cc) {
                    if (countC == 1) {
                        if (countUpper == 2) {
                            flag = true;
                        }
                    }
                }
            }
            System.out.println(flag ? "AC" : "WA");
        }

    }

}
