import java.util.*;
 
public class Main {
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	char[] S = sc.next().toCharArray();
    	String ans = "AC";
    	boolean check = true;
    	for (int i = 0; i < S.length; i++) {
    		if (i == 0) {
    			if (S[0] != 'A') ans = "WA";
    		} else if (1 < i && i < S.length-1 && check) {
    			if (S[i] == 'C') check = false;
    		} else {
    			if (S[i] < 97) ans = "WA";
    		}
    	}
    	System.out.println(check ? "WA" : ans);
    }
} import java.util.*; util.* java public class Main {
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	char[] S = sc.next().toCharArray();
    	String ans = "AC";
    	boolean check = true;
    	for (int i = 0; i < S.length; i++) {
    		if (i == 0) {
    			if (S[0] != 'A') ans = "WA";
    		} else if (1 < i && i < S.length-1 && check) {
    			if (S[i] == 'C') check = false;
    		} else {
    			if (S[i] < 97) ans = "WA";
    		}
    	}
    	System.out.println(check ? "WA" : ans);
    }
} Main public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	char[] S = sc.next().toCharArray();
    	String ans = "AC";
    	boolean check = true;
    	for (int i = 0; i < S.length; i++) {
    		if (i == 0) {
    			if (S[0] != 'A') ans = "WA";
    		} else if (1 < i && i < S.length-1 && check) {
    			if (S[i] == 'C') check = false;
    		} else {
    			if (S[i] < 97) ans = "WA";
    		}
    	}
    	System.out.println(check ? "WA" : ans);
    } main {
    	Scanner sc = new Scanner(System.in);
    	char[] S = sc.next().toCharArray();
    	String ans = "AC";
    	boolean check = true;
    	for (int i = 0; i < S.length; i++) {
    		if (i == 0) {
    			if (S[0] != 'A') ans = "WA";
    		} else if (1 < i && i < S.length-1 && check) {
    			if (S[i] == 'C') check = false;
    		} else {
    			if (S[i] < 97) ans = "WA";
    		}
    	}
    	System.out.println(check ? "WA" : ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] S = sc.next().toCharArray(); S sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc String ans = "AC"; ans "AC" boolean check = true; check true for (int i = 0; i < S.length; i++) {
    		if (i == 0) {
    			if (S[0] != 'A') ans = "WA";
    		} else if (1 < i && i < S.length-1 && check) {
    			if (S[i] == 'C') check = false;
    		} else {
    			if (S[i] < 97) ans = "WA";
    		}
    	} int i = 0; int i = 0; i 0 i < S.length i S.length S S.length i++ i++ i {
    		if (i == 0) {
    			if (S[0] != 'A') ans = "WA";
    		} else if (1 < i && i < S.length-1 && check) {
    			if (S[i] == 'C') check = false;
    		} else {
    			if (S[i] < 97) ans = "WA";
    		}
    	} {
    		if (i == 0) {
    			if (S[0] != 'A') ans = "WA";
    		} else if (1 < i && i < S.length-1 && check) {
    			if (S[i] == 'C') check = false;
    		} else {
    			if (S[i] < 97) ans = "WA";
    		}
    	} if (i == 0) {
    			if (S[0] != 'A') ans = "WA";
    		} else if (1 < i && i < S.length-1 && check) {
    			if (S[i] == 'C') check = false;
    		} else {
    			if (S[i] < 97) ans = "WA";
    		} i == 0 i 0 {
    			if (S[0] != 'A') ans = "WA";
    		} if (S[0] != 'A') ans = "WA"; S[0] != 'A' S[0] S 0 'A' ans = "WA" ans "WA" if (1 < i && i < S.length-1 && check) {
    			if (S[i] == 'C') check = false;
    		} else {
    			if (S[i] < 97) ans = "WA";
    		} 1 < i && i < S.length-1 && check 1 < i && i < S.length-1 && check 1 < i 1 i i < S.length-1 i S.length-1 S.length S S.length 1 check {
    			if (S[i] == 'C') check = false;
    		} if (S[i] == 'C') check = false; S[i] == 'C' S[i] S i 'C' check = false check false {
    			if (S[i] < 97) ans = "WA";
    		} if (S[i] < 97) ans = "WA"; S[i] < 97 S[i] S i 97 ans = "WA" ans "WA" System.out.println(check ? "WA" : ans) System.out.println System.out System System.out check ? "WA" : ans check "WA" ans String[] args args public class Main {
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	char[] S = sc.next().toCharArray();
    	String ans = "AC";
    	boolean check = true;
    	for (int i = 0; i < S.length; i++) {
    		if (i == 0) {
    			if (S[0] != 'A') ans = "WA";
    		} else if (1 < i && i < S.length-1 && check) {
    			if (S[i] == 'C') check = false;
    		} else {
    			if (S[i] < 97) ans = "WA";
    		}
    	}
    	System.out.println(check ? "WA" : ans);
    }
} public class Main {
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	char[] S = sc.next().toCharArray();
    	String ans = "AC";
    	boolean check = true;
    	for (int i = 0; i < S.length; i++) {
    		if (i == 0) {
    			if (S[0] != 'A') ans = "WA";
    		} else if (1 < i && i < S.length-1 && check) {
    			if (S[i] == 'C') check = false;
    		} else {
    			if (S[i] < 97) ans = "WA";
    		}
    	}
    	System.out.println(check ? "WA" : ans);
    }
} Main
import java.util.*;
 
public class Main {
	
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	char[] S = sc.next().toCharArray();
    	String ans = "AC";
    	boolean check = true;
    	for (int i = 0; i < S.length; i++) {
    		if (i == 0) {
    			if (S[0] != 'A') ans = "WA";
    		} else if (1 < i && i < S.length-1 && check) {
    			if (S[i] == 'C') check = false;
    		} else {
    			if (S[i] < 97) ans = "WA";
    		}
    	}
    	System.out.println(check ? "WA" : ans);
    }
}