import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        //System.err.println(s);
        boolean flag = true;
        if(s.startsWith("A")) {
            String ns = s.substring(2, s.length()-1);
            int count = 0;
            for(char c : ns.toCharArray()) {
                if(c=='C') {
                    count++;
                }
            }
            if(count!=1) {
                //System.err.println("not 1");
                flag = false;
            }
            for(char c : s.substring(1).toCharArray()) {
                if(c!='C' && !String.valueOf(c).toLowerCase().equals(String.valueOf(c))) {
                    flag = false;
                }
            }
        } else {
            //System.err.println("not A");
            flag = false;
        }
        System.out.println(flag ? "AC" : "WA");
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        //System.err.println(s);
        boolean flag = true;
        if(s.startsWith("A")) {
            String ns = s.substring(2, s.length()-1);
            int count = 0;
            for(char c : ns.toCharArray()) {
                if(c=='C') {
                    count++;
                }
            }
            if(count!=1) {
                //System.err.println("not 1");
                flag = false;
            }
            for(char c : s.substring(1).toCharArray()) {
                if(c!='C' && !String.valueOf(c).toLowerCase().equals(String.valueOf(c))) {
                    flag = false;
                }
            }
        } else {
            //System.err.println("not A");
            flag = false;
        }
        System.out.println(flag ? "AC" : "WA");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        //System.err.println(s);
        boolean flag = true;
        if(s.startsWith("A")) {
            String ns = s.substring(2, s.length()-1);
            int count = 0;
            for(char c : ns.toCharArray()) {
                if(c=='C') {
                    count++;
                }
            }
            if(count!=1) {
                //System.err.println("not 1");
                flag = false;
            }
            for(char c : s.substring(1).toCharArray()) {
                if(c!='C' && !String.valueOf(c).toLowerCase().equals(String.valueOf(c))) {
                    flag = false;
                }
            }
        } else {
            //System.err.println("not A");
            flag = false;
        }
        System.out.println(flag ? "AC" : "WA");
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        //System.err.println(s);
        boolean flag = true;
        if(s.startsWith("A")) {
            String ns = s.substring(2, s.length()-1);
            int count = 0;
            for(char c : ns.toCharArray()) {
                if(c=='C') {
                    count++;
                }
            }
            if(count!=1) {
                //System.err.println("not 1");
                flag = false;
            }
            for(char c : s.substring(1).toCharArray()) {
                if(c!='C' && !String.valueOf(c).toLowerCase().equals(String.valueOf(c))) {
                    flag = false;
                }
            }
        } else {
            //System.err.println("not A");
            flag = false;
        }
        System.out.println(flag ? "AC" : "WA");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc boolean flag = true; flag true if(s.startsWith("A")) {
            String ns = s.substring(2, s.length()-1);
            int count = 0;
            for(char c : ns.toCharArray()) {
                if(c=='C') {
                    count++;
                }
            }
            if(count!=1) {
                //System.err.println("not 1");
                flag = false;
            }
            for(char c : s.substring(1).toCharArray()) {
                if(c!='C' && !String.valueOf(c).toLowerCase().equals(String.valueOf(c))) {
                    flag = false;
                }
            }
        } else {
            //System.err.println("not A");
            flag = false;
        } s.startsWith("A") s.startsWith s "A" {
            String ns = s.substring(2, s.length()-1);
            int count = 0;
            for(char c : ns.toCharArray()) {
                if(c=='C') {
                    count++;
                }
            }
            if(count!=1) {
                //System.err.println("not 1");
                flag = false;
            }
            for(char c : s.substring(1).toCharArray()) {
                if(c!='C' && !String.valueOf(c).toLowerCase().equals(String.valueOf(c))) {
                    flag = false;
                }
            }
        } String ns = s.substring(2, s.length()-1); ns s.substring(2, s.length()-1) s.substring s 2 s.length()-1 s.length() s.length s 1 int count = 0; count 0 for(char c : ns.toCharArray()) {
                if(c=='C') {
                    count++;
                }
            } char c ns.toCharArray() ns.toCharArray ns {
                if(c=='C') {
                    count++;
                }
            } {
                if(c=='C') {
                    count++;
                }
            } if(c=='C') {
                    count++;
                } c=='C' c 'C' {
                    count++;
                } count++ count if(count!=1) {
                //System.err.println("not 1");
                flag = false;
            } count!=1 count 1 {
                //System.err.println("not 1");
                flag = false;
            } flag = false flag false for(char c : s.substring(1).toCharArray()) {
                if(c!='C' && !String.valueOf(c).toLowerCase().equals(String.valueOf(c))) {
                    flag = false;
                }
            } char c s.substring(1).toCharArray() s.substring(1).toCharArray s.substring(1) s.substring s 1 {
                if(c!='C' && !String.valueOf(c).toLowerCase().equals(String.valueOf(c))) {
                    flag = false;
                }
            } {
                if(c!='C' && !String.valueOf(c).toLowerCase().equals(String.valueOf(c))) {
                    flag = false;
                }
            } if(c!='C' && !String.valueOf(c).toLowerCase().equals(String.valueOf(c))) {
                    flag = false;
                } c!='C' && !String.valueOf(c).toLowerCase().equals(String.valueOf(c)) c!='C' c 'C' !String.valueOf(c).toLowerCase().equals(String.valueOf(c)) String.valueOf(c).toLowerCase().equals(String.valueOf(c)) String.valueOf(c).toLowerCase().equals String.valueOf(c).toLowerCase() String.valueOf(c).toLowerCase String.valueOf(c) String.valueOf String c String.valueOf(c) String.valueOf String c {
                    flag = false;
                } flag = false flag false {
            //System.err.println("not A");
            flag = false;
        } flag = false flag false 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) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        //System.err.println(s);
        boolean flag = true;
        if(s.startsWith("A")) {
            String ns = s.substring(2, s.length()-1);
            int count = 0;
            for(char c : ns.toCharArray()) {
                if(c=='C') {
                    count++;
                }
            }
            if(count!=1) {
                //System.err.println("not 1");
                flag = false;
            }
            for(char c : s.substring(1).toCharArray()) {
                if(c!='C' && !String.valueOf(c).toLowerCase().equals(String.valueOf(c))) {
                    flag = false;
                }
            }
        } else {
            //System.err.println("not A");
            flag = false;
        }
        System.out.println(flag ? "AC" : "WA");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        //System.err.println(s);
        boolean flag = true;
        if(s.startsWith("A")) {
            String ns = s.substring(2, s.length()-1);
            int count = 0;
            for(char c : ns.toCharArray()) {
                if(c=='C') {
                    count++;
                }
            }
            if(count!=1) {
                //System.err.println("not 1");
                flag = false;
            }
            for(char c : s.substring(1).toCharArray()) {
                if(c!='C' && !String.valueOf(c).toLowerCase().equals(String.valueOf(c))) {
                    flag = false;
                }
            }
        } else {
            //System.err.println("not A");
            flag = false;
        }
        System.out.println(flag ? "AC" : "WA");
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        //System.err.println(s);
        boolean flag = true;
        if(s.startsWith("A")) {
            String ns = s.substring(2, s.length()-1);
            int count = 0;
            for(char c : ns.toCharArray()) {
                if(c=='C') {
                    count++;
                }
            }
            if(count!=1) {
                //System.err.println("not 1");
                flag = false;
            }
            for(char c : s.substring(1).toCharArray()) {
                if(c!='C' && !String.valueOf(c).toLowerCase().equals(String.valueOf(c))) {
                    flag = false;
                }
            }
        } else {
            //System.err.println("not A");
            flag = false;
        }
        System.out.println(flag ? "AC" : "WA");
    }
}