import java.util.*;
public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                String s = sc.next();
                int cou = 0;
                boolean ebishu = true;
                if(s.charAt(0) != 'A') ebishu = false;
                for(int i = 2 ; i < s.length() - 1 ; i++){
                        if(s.charAt(i) == 'C'){
                                cou++;
                        }else if(s.charAt(i) >= 97 && s.charAt(i) <= 123){}else{
                                ebishu = false;
                        }
                }
                if(cou != 1) ebishu = false;
                if(s.charAt(s.length() - 1) >= 97 && s.charAt(s.length() - 1) <= 123){}else{
                        ebishu = false;
                }
                if(s.charAt(1) >= 97 && s.charAt(1) <= 123){}else{
                        ebishu = false;
                }
                if(ebishu){
                        System.out.println("AC");
                }else{
                        System.out.println("WA");
                }
        }
}//0=48
 //a=97 a -> +26 = 123
//鶏になれ import java.util.*; util.* java public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                String s = sc.next();
                int cou = 0;
                boolean ebishu = true;
                if(s.charAt(0) != 'A') ebishu = false;
                for(int i = 2 ; i < s.length() - 1 ; i++){
                        if(s.charAt(i) == 'C'){
                                cou++;
                        }else if(s.charAt(i) >= 97 && s.charAt(i) <= 123){}else{
                                ebishu = false;
                        }
                }
                if(cou != 1) ebishu = false;
                if(s.charAt(s.length() - 1) >= 97 && s.charAt(s.length() - 1) <= 123){}else{
                        ebishu = false;
                }
                if(s.charAt(1) >= 97 && s.charAt(1) <= 123){}else{
                        ebishu = false;
                }
                if(ebishu){
                        System.out.println("AC");
                }else{
                        System.out.println("WA");
                }
        }
}//0=48 Main public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                String s = sc.next();
                int cou = 0;
                boolean ebishu = true;
                if(s.charAt(0) != 'A') ebishu = false;
                for(int i = 2 ; i < s.length() - 1 ; i++){
                        if(s.charAt(i) == 'C'){
                                cou++;
                        }else if(s.charAt(i) >= 97 && s.charAt(i) <= 123){}else{
                                ebishu = false;
                        }
                }
                if(cou != 1) ebishu = false;
                if(s.charAt(s.length() - 1) >= 97 && s.charAt(s.length() - 1) <= 123){}else{
                        ebishu = false;
                }
                if(s.charAt(1) >= 97 && s.charAt(1) <= 123){}else{
                        ebishu = false;
                }
                if(ebishu){
                        System.out.println("AC");
                }else{
                        System.out.println("WA");
                }
        } main {
                Scanner sc = new Scanner(System.in);
                String s = sc.next();
                int cou = 0;
                boolean ebishu = true;
                if(s.charAt(0) != 'A') ebishu = false;
                for(int i = 2 ; i < s.length() - 1 ; i++){
                        if(s.charAt(i) == 'C'){
                                cou++;
                        }else if(s.charAt(i) >= 97 && s.charAt(i) <= 123){}else{
                                ebishu = false;
                        }
                }
                if(cou != 1) ebishu = false;
                if(s.charAt(s.length() - 1) >= 97 && s.charAt(s.length() - 1) <= 123){}else{
                        ebishu = false;
                }
                if(s.charAt(1) >= 97 && s.charAt(1) <= 123){}else{
                        ebishu = false;
                }
                if(ebishu){
                        System.out.println("AC");
                }else{
                        System.out.println("WA");
                }
        } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int cou = 0; cou 0 boolean ebishu = true; ebishu true if(s.charAt(0) != 'A') ebishu = false; s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' ebishu = false ebishu false for(int i = 2 ; i < s.length() - 1 ; i++){
                        if(s.charAt(i) == 'C'){
                                cou++;
                        }else if(s.charAt(i) >= 97 && s.charAt(i) <= 123){}else{
                                ebishu = false;
                        }
                } int i = 2 ; int i = 2 ; i 2 i < s.length() - 1 i s.length() - 1 s.length() s.length s 1 i++ i++ i {
                        if(s.charAt(i) == 'C'){
                                cou++;
                        }else if(s.charAt(i) >= 97 && s.charAt(i) <= 123){}else{
                                ebishu = false;
                        }
                } {
                        if(s.charAt(i) == 'C'){
                                cou++;
                        }else if(s.charAt(i) >= 97 && s.charAt(i) <= 123){}else{
                                ebishu = false;
                        }
                } if(s.charAt(i) == 'C'){
                                cou++;
                        }else if(s.charAt(i) >= 97 && s.charAt(i) <= 123){}else{
                                ebishu = false;
                        } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
                                cou++;
                        } cou++ cou if(s.charAt(i) >= 97 && s.charAt(i) <= 123){}else{
                                ebishu = false;
                        } s.charAt(i) >= 97 && s.charAt(i) <= 123 s.charAt(i) >= 97 s.charAt(i) s.charAt s i 97 s.charAt(i) <= 123 s.charAt(i) s.charAt s i 123 {} {
                                ebishu = false;
                        } ebishu = false ebishu false if(cou != 1) ebishu = false; cou != 1 cou 1 ebishu = false ebishu false if(s.charAt(s.length() - 1) >= 97 && s.charAt(s.length() - 1) <= 123){}else{
                        ebishu = false;
                } s.charAt(s.length() - 1) >= 97 && s.charAt(s.length() - 1) <= 123 s.charAt(s.length() - 1) >= 97 s.charAt(s.length() - 1) s.charAt s s.length() - 1 s.length() s.length s 1 97 s.charAt(s.length() - 1) <= 123 s.charAt(s.length() - 1) s.charAt s s.length() - 1 s.length() s.length s 1 123 {} {
                        ebishu = false;
                } ebishu = false ebishu false if(s.charAt(1) >= 97 && s.charAt(1) <= 123){}else{
                        ebishu = false;
                } s.charAt(1) >= 97 && s.charAt(1) <= 123 s.charAt(1) >= 97 s.charAt(1) s.charAt s 1 97 s.charAt(1) <= 123 s.charAt(1) s.charAt s 1 123 {} {
                        ebishu = false;
                } ebishu = false ebishu false if(ebishu){
                        System.out.println("AC");
                }else{
                        System.out.println("WA");
                } ebishu {
                        System.out.println("AC");
                } System.out.println("AC") System.out.println System.out System System.out "AC" {
                        System.out.println("WA");
                } System.out.println("WA") System.out.println System.out System System.out "WA" String[] args args public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                String s = sc.next();
                int cou = 0;
                boolean ebishu = true;
                if(s.charAt(0) != 'A') ebishu = false;
                for(int i = 2 ; i < s.length() - 1 ; i++){
                        if(s.charAt(i) == 'C'){
                                cou++;
                        }else if(s.charAt(i) >= 97 && s.charAt(i) <= 123){}else{
                                ebishu = false;
                        }
                }
                if(cou != 1) ebishu = false;
                if(s.charAt(s.length() - 1) >= 97 && s.charAt(s.length() - 1) <= 123){}else{
                        ebishu = false;
                }
                if(s.charAt(1) >= 97 && s.charAt(1) <= 123){}else{
                        ebishu = false;
                }
                if(ebishu){
                        System.out.println("AC");
                }else{
                        System.out.println("WA");
                }
        }
}//0=48 public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                String s = sc.next();
                int cou = 0;
                boolean ebishu = true;
                if(s.charAt(0) != 'A') ebishu = false;
                for(int i = 2 ; i < s.length() - 1 ; i++){
                        if(s.charAt(i) == 'C'){
                                cou++;
                        }else if(s.charAt(i) >= 97 && s.charAt(i) <= 123){}else{
                                ebishu = false;
                        }
                }
                if(cou != 1) ebishu = false;
                if(s.charAt(s.length() - 1) >= 97 && s.charAt(s.length() - 1) <= 123){}else{
                        ebishu = false;
                }
                if(s.charAt(1) >= 97 && s.charAt(1) <= 123){}else{
                        ebishu = false;
                }
                if(ebishu){
                        System.out.println("AC");
                }else{
                        System.out.println("WA");
                }
        }
}//0=48 Main
import java.util.*;
public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                String s = sc.next();
                int cou = 0;
                boolean ebishu = true;
                if(s.charAt(0) != 'A') ebishu = false;
                for(int i = 2 ; i < s.length() - 1 ; i++){
                        if(s.charAt(i) == 'C'){
                                cou++;
                        }else if(s.charAt(i) >= 97 && s.charAt(i) <= 123){}else{
                                ebishu = false;
                        }
                }
                if(cou != 1) ebishu = false;
                if(s.charAt(s.length() - 1) >= 97 && s.charAt(s.length() - 1) <= 123){}else{
                        ebishu = false;
                }
                if(s.charAt(1) >= 97 && s.charAt(1) <= 123){}else{
                        ebishu = false;
                }
                if(ebishu){
                        System.out.println("AC");
                }else{
                        System.out.println("WA");
                }
        }
}//0=48
 //a=97 a -> +26 = 123
//鶏になれ