import java.util.Scanner;
public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[]ss = S.toCharArray();

        int cou = 0;
        int C = 0;
        for(int i=2; i<S.length()-1; i++) {
        	if(ss[i] == 'C') {
        		C++;
        	}
        }
        for(int i=0; i<S.length(); i++) {
        	if(ss[i]>96) {
        		cou++;
        	}
        }
        
        if(ss[0]=='A' && C==1 && cou==S.length()-2){
            System.out.println("AC");    
        }else{
            System.out.println("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();
        char[]ss = S.toCharArray();

        int cou = 0;
        int C = 0;
        for(int i=2; i<S.length()-1; i++) {
        	if(ss[i] == 'C') {
        		C++;
        	}
        }
        for(int i=0; i<S.length(); i++) {
        	if(ss[i]>96) {
        		cou++;
        	}
        }
        
        if(ss[0]=='A' && C==1 && cou==S.length()-2){
            System.out.println("AC");    
        }else{
            System.out.println("WA");
    }
}
} Main public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[]ss = S.toCharArray();

        int cou = 0;
        int C = 0;
        for(int i=2; i<S.length()-1; i++) {
        	if(ss[i] == 'C') {
        		C++;
        	}
        }
        for(int i=0; i<S.length(); i++) {
        	if(ss[i]>96) {
        		cou++;
        	}
        }
        
        if(ss[0]=='A' && C==1 && cou==S.length()-2){
            System.out.println("AC");    
        }else{
            System.out.println("WA");
    }
} main {
    
    Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[]ss = S.toCharArray();

        int cou = 0;
        int C = 0;
        for(int i=2; i<S.length()-1; i++) {
        	if(ss[i] == 'C') {
        		C++;
        	}
        }
        for(int i=0; i<S.length(); i++) {
        	if(ss[i]>96) {
        		cou++;
        	}
        }
        
        if(ss[0]=='A' && C==1 && cou==S.length()-2){
            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 char[]ss = S.toCharArray(); ss S.toCharArray() S.toCharArray S int cou = 0; cou 0 int C = 0; C 0 for(int i=2; i<S.length()-1; i++) {
        	if(ss[i] == 'C') {
        		C++;
        	}
        } 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(ss[i] == 'C') {
        		C++;
        	}
        } {
        	if(ss[i] == 'C') {
        		C++;
        	}
        } if(ss[i] == 'C') {
        		C++;
        	} ss[i] == 'C' ss[i] ss i 'C' {
        		C++;
        	} C++ C for(int i=0; i<S.length(); i++) {
        	if(ss[i]>96) {
        		cou++;
        	}
        } int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
        	if(ss[i]>96) {
        		cou++;
        	}
        } {
        	if(ss[i]>96) {
        		cou++;
        	}
        } if(ss[i]>96) {
        		cou++;
        	} ss[i]>96 ss[i] ss i 96 {
        		cou++;
        	} cou++ cou if(ss[0]=='A' && C==1 && cou==S.length()-2){
            System.out.println("AC");    
        }else{
            System.out.println("WA");
    } ss[0]=='A' && C==1 && cou==S.length()-2 ss[0]=='A' && C==1 && cou==S.length()-2 ss[0]=='A' ss[0] ss 0 'A' C==1 C 1 cou==S.length()-2 cou S.length()-2 S.length() S.length S 2 {
            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();
        char[]ss = S.toCharArray();

        int cou = 0;
        int C = 0;
        for(int i=2; i<S.length()-1; i++) {
        	if(ss[i] == 'C') {
        		C++;
        	}
        }
        for(int i=0; i<S.length(); i++) {
        	if(ss[i]>96) {
        		cou++;
        	}
        }
        
        if(ss[0]=='A' && C==1 && cou==S.length()-2){
            System.out.println("AC");    
        }else{
            System.out.println("WA");
    }
}
} public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
        String S = sc.next();
        char[]ss = S.toCharArray();

        int cou = 0;
        int C = 0;
        for(int i=2; i<S.length()-1; i++) {
        	if(ss[i] == 'C') {
        		C++;
        	}
        }
        for(int i=0; i<S.length(); i++) {
        	if(ss[i]>96) {
        		cou++;
        	}
        }
        
        if(ss[0]=='A' && C==1 && cou==S.length()-2){
            System.out.println("AC");    
        }else{
            System.out.println("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();
        char[]ss = S.toCharArray();

        int cou = 0;
        int C = 0;
        for(int i=2; i<S.length()-1; i++) {
        	if(ss[i] == 'C') {
        		C++;
        	}
        }
        for(int i=0; i<S.length(); i++) {
        	if(ss[i]>96) {
        		cou++;
        	}
        }
        
        if(ss[0]=='A' && C==1 && cou==S.length()-2){
            System.out.println("AC");    
        }else{
            System.out.println("WA");
    }
}
}
