import java.util.*;
import java.math.BigInteger;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int countC = 0;
        int count = 0;
        
        if(str.charAt(0) == 'A' && !Character.isUpperCase(str.charAt(1))){
            //System.out.println("test");
            for(int i=2; i<str.length()-1; i++){
                if(str.charAt(i) == 'C'){
                    countC++;
                   //System.out.println("test1");
                }
                if(Character.isUpperCase(str.charAt(i))){
                    count++;
                    //System.out.println("test2");
                }
                if(countC > 1 || count >1){
                    //System.out.println("test3");
                    break;
                }
            }
        }else{
            
        }
        
        if(countC==1 && !Character.isUpperCase(str.charAt(str.length()-1))){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    }
}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz