import java.util.*;
class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	String s = sc.next();
	boolean isok = true;
	if(s.length()<4) {
	    System.out.println("WA");
	    return;
	}
	if(s.charAt(0) != 'A') {
	    System.out.println("WA");
            return;
	}
	String miniS = s.substring(2, s.length()-1);
	String ms = miniS.replace("C", "");
	if(miniS.length() - ms.length() != 1) {
	    System.out.println("WA");
            return;
	}
	String lowcase = s.charAt(1) + ms.substring(0, ms.length()) + s.charAt(s.length()-1);
	if(!lowcase.equals(lowcase.toLowerCase())) {
	    System.out.println("WA");
            return;
	}
	System.out.println("AC");
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	String s = sc.next();
	boolean isok = true;
	if(s.length()<4) {
	    System.out.println("WA");
	    return;
	}
	if(s.charAt(0) != 'A') {
	    System.out.println("WA");
            return;
	}
	String miniS = s.substring(2, s.length()-1);
	String ms = miniS.replace("C", "");
	if(miniS.length() - ms.length() != 1) {
	    System.out.println("WA");
            return;
	}
	String lowcase = s.charAt(1) + ms.substring(0, ms.length()) + s.charAt(s.length()-1);
	if(!lowcase.equals(lowcase.toLowerCase())) {
	    System.out.println("WA");
            return;
	}
	System.out.println("AC");
    }
} Main public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	String s = sc.next();
	boolean isok = true;
	if(s.length()<4) {
	    System.out.println("WA");
	    return;
	}
	if(s.charAt(0) != 'A') {
	    System.out.println("WA");
            return;
	}
	String miniS = s.substring(2, s.length()-1);
	String ms = miniS.replace("C", "");
	if(miniS.length() - ms.length() != 1) {
	    System.out.println("WA");
            return;
	}
	String lowcase = s.charAt(1) + ms.substring(0, ms.length()) + s.charAt(s.length()-1);
	if(!lowcase.equals(lowcase.toLowerCase())) {
	    System.out.println("WA");
            return;
	}
	System.out.println("AC");
    } main {
	Scanner sc = new Scanner(System.in);
	String s = sc.next();
	boolean isok = true;
	if(s.length()<4) {
	    System.out.println("WA");
	    return;
	}
	if(s.charAt(0) != 'A') {
	    System.out.println("WA");
            return;
	}
	String miniS = s.substring(2, s.length()-1);
	String ms = miniS.replace("C", "");
	if(miniS.length() - ms.length() != 1) {
	    System.out.println("WA");
            return;
	}
	String lowcase = s.charAt(1) + ms.substring(0, ms.length()) + s.charAt(s.length()-1);
	if(!lowcase.equals(lowcase.toLowerCase())) {
	    System.out.println("WA");
            return;
	}
	System.out.println("AC");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc boolean isok = true; isok true if(s.length()<4) {
	    System.out.println("WA");
	    return;
	} s.length()<4 s.length() s.length s 4 {
	    System.out.println("WA");
	    return;
	} System.out.println("WA") System.out.println System.out System System.out "WA" return; 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; String miniS = s.substring(2, s.length()-1); miniS s.substring(2, s.length()-1) s.substring s 2 s.length()-1 s.length() s.length s 1 String ms = miniS.replace("C", ""); ms miniS.replace("C", "") miniS.replace miniS "C" "" if(miniS.length() - ms.length() != 1) {
	    System.out.println("WA");
            return;
	} miniS.length() - ms.length() != 1 miniS.length() - ms.length() miniS.length() miniS.length miniS ms.length() ms.length ms 1 {
	    System.out.println("WA");
            return;
	} System.out.println("WA") System.out.println System.out System System.out "WA" return; String lowcase = s.charAt(1) + ms.substring(0, ms.length()) + s.charAt(s.length()-1); lowcase s.charAt(1) + ms.substring(0, ms.length()) + s.charAt(s.length()-1) s.charAt(1) + ms.substring(0, ms.length()) + s.charAt(s.length()-1) s.charAt(1) s.charAt s 1 ms.substring(0, ms.length()) ms.substring ms 0 ms.length() ms.length ms s.charAt(s.length()-1) s.charAt s s.length()-1 s.length() s.length s 1 if(!lowcase.equals(lowcase.toLowerCase())) {
	    System.out.println("WA");
            return;
	} !lowcase.equals(lowcase.toLowerCase()) lowcase.equals(lowcase.toLowerCase()) lowcase.equals lowcase lowcase.toLowerCase() lowcase.toLowerCase lowcase {
	    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" String[] args args
import java.util.*;
class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	String s = sc.next();
	boolean isok = true;
	if(s.length()<4) {
	    System.out.println("WA");
	    return;
	}
	if(s.charAt(0) != 'A') {
	    System.out.println("WA");
            return;
	}
	String miniS = s.substring(2, s.length()-1);
	String ms = miniS.replace("C", "");
	if(miniS.length() - ms.length() != 1) {
	    System.out.println("WA");
            return;
	}
	String lowcase = s.charAt(1) + ms.substring(0, ms.length()) + s.charAt(s.length()-1);
	if(!lowcase.equals(lowcase.toLowerCase())) {
	    System.out.println("WA");
            return;
	}
	System.out.println("AC");
    }
}