import java.util.*;


public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
		
		if(s.charAt(0)!='A'){
		    System.out.println("WA");
		    return;
		}
		
		int ccount=0;
		int cnum=0;
		for(int i=2; i<s.length()-1; i++){
		    if(s.charAt(i)=='C'){
		        ccount++;
		        cnum=i;
		    }
		}
		
		if(ccount!=1){
		    System.out.println("WA");
		    return;
		}
		
		for(int i=1; i<s.length(); i++){
		    if(i!=cnum){
		        if(Character.isUpperCase(s.charAt(i))){
		            System.out.println("WA");
		            return;
		        }
		    }
		}
		
		System.out.println("AC");
		return;
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
		
		if(s.charAt(0)!='A'){
		    System.out.println("WA");
		    return;
		}
		
		int ccount=0;
		int cnum=0;
		for(int i=2; i<s.length()-1; i++){
		    if(s.charAt(i)=='C'){
		        ccount++;
		        cnum=i;
		    }
		}
		
		if(ccount!=1){
		    System.out.println("WA");
		    return;
		}
		
		for(int i=1; i<s.length(); i++){
		    if(i!=cnum){
		        if(Character.isUpperCase(s.charAt(i))){
		            System.out.println("WA");
		            return;
		        }
		    }
		}
		
		System.out.println("AC");
		return;
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
		
		if(s.charAt(0)!='A'){
		    System.out.println("WA");
		    return;
		}
		
		int ccount=0;
		int cnum=0;
		for(int i=2; i<s.length()-1; i++){
		    if(s.charAt(i)=='C'){
		        ccount++;
		        cnum=i;
		    }
		}
		
		if(ccount!=1){
		    System.out.println("WA");
		    return;
		}
		
		for(int i=1; i<s.length(); i++){
		    if(i!=cnum){
		        if(Character.isUpperCase(s.charAt(i))){
		            System.out.println("WA");
		            return;
		        }
		    }
		}
		
		System.out.println("AC");
		return;
    } main {
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
		
		if(s.charAt(0)!='A'){
		    System.out.println("WA");
		    return;
		}
		
		int ccount=0;
		int cnum=0;
		for(int i=2; i<s.length()-1; i++){
		    if(s.charAt(i)=='C'){
		        ccount++;
		        cnum=i;
		    }
		}
		
		if(ccount!=1){
		    System.out.println("WA");
		    return;
		}
		
		for(int i=1; i<s.length(); i++){
		    if(i!=cnum){
		        if(Character.isUpperCase(s.charAt(i))){
		            System.out.println("WA");
		            return;
		        }
		    }
		}
		
		System.out.println("AC");
		return;
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc if(s.charAt(0)!='A'){
		    System.out.println("WA");
		    return;
		} s.charAt(0)!='A' s.charAt(0) s.charAt s 0 'A' {
		    System.out.println("WA");
		    return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; int ccount=0; ccount 0 int cnum=0; cnum 0 for(int i=2; i<s.length()-1; i++){
		    if(s.charAt(i)=='C'){
		        ccount++;
		        cnum=i;
		    }
		} 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'){
		        ccount++;
		        cnum=i;
		    }
		} {
		    if(s.charAt(i)=='C'){
		        ccount++;
		        cnum=i;
		    }
		} if(s.charAt(i)=='C'){
		        ccount++;
		        cnum=i;
		    } s.charAt(i)=='C' s.charAt(i) s.charAt s i 'C' {
		        ccount++;
		        cnum=i;
		    } ccount++ ccount cnum=i cnum i if(ccount!=1){
		    System.out.println("WA");
		    return;
		} ccount!=1 ccount 1 {
		    System.out.println("WA");
		    return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; for(int i=1; i<s.length(); i++){
		    if(i!=cnum){
		        if(Character.isUpperCase(s.charAt(i))){
		            System.out.println("WA");
		            return;
		        }
		    }
		} int i=1; int i=1; i 1 i<s.length() i s.length() s.length s i++ i++ i {
		    if(i!=cnum){
		        if(Character.isUpperCase(s.charAt(i))){
		            System.out.println("WA");
		            return;
		        }
		    }
		} {
		    if(i!=cnum){
		        if(Character.isUpperCase(s.charAt(i))){
		            System.out.println("WA");
		            return;
		        }
		    }
		} if(i!=cnum){
		        if(Character.isUpperCase(s.charAt(i))){
		            System.out.println("WA");
		            return;
		        }
		    } i!=cnum i cnum {
		        if(Character.isUpperCase(s.charAt(i))){
		            System.out.println("WA");
		            return;
		        }
		    } if(Character.isUpperCase(s.charAt(i))){
		            System.out.println("WA");
		            return;
		        } Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i {
		            System.out.println("WA");
		            return;
		        } System.out.println("WA") System.out.println System.out System System.out "WA" return; System.out.println("AC") System.out.println System.out System System.out "AC" return; String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
		
		if(s.charAt(0)!='A'){
		    System.out.println("WA");
		    return;
		}
		
		int ccount=0;
		int cnum=0;
		for(int i=2; i<s.length()-1; i++){
		    if(s.charAt(i)=='C'){
		        ccount++;
		        cnum=i;
		    }
		}
		
		if(ccount!=1){
		    System.out.println("WA");
		    return;
		}
		
		for(int i=1; i<s.length(); i++){
		    if(i!=cnum){
		        if(Character.isUpperCase(s.charAt(i))){
		            System.out.println("WA");
		            return;
		        }
		    }
		}
		
		System.out.println("AC");
		return;
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
		
		if(s.charAt(0)!='A'){
		    System.out.println("WA");
		    return;
		}
		
		int ccount=0;
		int cnum=0;
		for(int i=2; i<s.length()-1; i++){
		    if(s.charAt(i)=='C'){
		        ccount++;
		        cnum=i;
		    }
		}
		
		if(ccount!=1){
		    System.out.println("WA");
		    return;
		}
		
		for(int i=1; i<s.length(); i++){
		    if(i!=cnum){
		        if(Character.isUpperCase(s.charAt(i))){
		            System.out.println("WA");
		            return;
		        }
		    }
		}
		
		System.out.println("AC");
		return;
    }
} Main
import java.util.*;


public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
		
		if(s.charAt(0)!='A'){
		    System.out.println("WA");
		    return;
		}
		
		int ccount=0;
		int cnum=0;
		for(int i=2; i<s.length()-1; i++){
		    if(s.charAt(i)=='C'){
		        ccount++;
		        cnum=i;
		    }
		}
		
		if(ccount!=1){
		    System.out.println("WA");
		    return;
		}
		
		for(int i=1; i<s.length(); i++){
		    if(i!=cnum){
		        if(Character.isUpperCase(s.charAt(i))){
		            System.out.println("WA");
		            return;
		        }
		    }
		}
		
		System.out.println("AC");
		return;
    }
}
