import java.util.*;

class Main{
	
	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		boolean flag = true;
		boolean C = false;
		for(int n=1;n<st.length();n++){
				if(!(0<=(st.charAt(n)-'a') &&(st.charAt(n)-'a')<=25)){
					if(!C && st.charAt(n) == 'C' && n!=1 && n!=st.length()-1) C = true;
					else flag = false;
				}
		}
		if(!C) flag = false;

		if(st.charAt(0) == 'A'){
		}else{
			flag = false;
		}

		if(flag) System.out.println("AC");
		else System.out.println("WA");

	}
} import java.util.*; util.* java class Main{
	
	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		boolean flag = true;
		boolean C = false;
		for(int n=1;n<st.length();n++){
				if(!(0<=(st.charAt(n)-'a') &&(st.charAt(n)-'a')<=25)){
					if(!C && st.charAt(n) == 'C' && n!=1 && n!=st.length()-1) C = true;
					else flag = false;
				}
		}
		if(!C) flag = false;

		if(st.charAt(0) == 'A'){
		}else{
			flag = false;
		}

		if(flag) System.out.println("AC");
		else System.out.println("WA");

	}
} Main public static void main(String args[]){

		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		boolean flag = true;
		boolean C = false;
		for(int n=1;n<st.length();n++){
				if(!(0<=(st.charAt(n)-'a') &&(st.charAt(n)-'a')<=25)){
					if(!C && st.charAt(n) == 'C' && n!=1 && n!=st.length()-1) C = true;
					else flag = false;
				}
		}
		if(!C) flag = false;

		if(st.charAt(0) == 'A'){
		}else{
			flag = false;
		}

		if(flag) System.out.println("AC");
		else System.out.println("WA");

	} main {

		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		boolean flag = true;
		boolean C = false;
		for(int n=1;n<st.length();n++){
				if(!(0<=(st.charAt(n)-'a') &&(st.charAt(n)-'a')<=25)){
					if(!C && st.charAt(n) == 'C' && n!=1 && n!=st.length()-1) C = true;
					else flag = false;
				}
		}
		if(!C) flag = false;

		if(st.charAt(0) == 'A'){
		}else{
			flag = false;
		}

		if(flag) System.out.println("AC");
		else System.out.println("WA");

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String st = sc.next(); st sc.next() sc.next sc boolean flag = true; flag true boolean C = false; C false for(int n=1;n<st.length();n++){
				if(!(0<=(st.charAt(n)-'a') &&(st.charAt(n)-'a')<=25)){
					if(!C && st.charAt(n) == 'C' && n!=1 && n!=st.length()-1) C = true;
					else flag = false;
				}
		} int n=1; int n=1; n 1 n<st.length() n st.length() st.length st n++ n++ n {
				if(!(0<=(st.charAt(n)-'a') &&(st.charAt(n)-'a')<=25)){
					if(!C && st.charAt(n) == 'C' && n!=1 && n!=st.length()-1) C = true;
					else flag = false;
				}
		} {
				if(!(0<=(st.charAt(n)-'a') &&(st.charAt(n)-'a')<=25)){
					if(!C && st.charAt(n) == 'C' && n!=1 && n!=st.length()-1) C = true;
					else flag = false;
				}
		} if(!(0<=(st.charAt(n)-'a') &&(st.charAt(n)-'a')<=25)){
					if(!C && st.charAt(n) == 'C' && n!=1 && n!=st.length()-1) C = true;
					else flag = false;
				} !(0<=(st.charAt(n)-'a') &&(st.charAt(n)-'a')<=25) (0<=(st.charAt(n)-'a') &&(st.charAt(n)-'a')<=25) 0<=(st.charAt(n)-'a') 0 (st.charAt(n)-'a') st.charAt(n) st.charAt st n 'a' (st.charAt(n)-'a')<=25 (st.charAt(n)-'a') st.charAt(n) st.charAt st n 'a' 25 {
					if(!C && st.charAt(n) == 'C' && n!=1 && n!=st.length()-1) C = true;
					else flag = false;
				} if(!C && st.charAt(n) == 'C' && n!=1 && n!=st.length()-1) C = true;
					else flag = false; !C && st.charAt(n) == 'C' && n!=1 && n!=st.length()-1 n!=1 !C && st.charAt(n) == 'C' && n!=1 && n!=st.length()-1 !C C st.charAt(n) == 'C' st.charAt(n) st.charAt st n 'C' n!=1 n 1 n!=st.length()-1 n st.length()-1 st.length() st.length st 1 C = true C true flag = false flag false if(!C) flag = false; !C C flag = false flag false if(st.charAt(0) == 'A'){
		}else{
			flag = false;
		} st.charAt(0) == 'A' st.charAt(0) st.charAt st 0 'A' {
		} {
			flag = false;
		} flag = false flag false if(flag) System.out.println("AC");
		else System.out.println("WA"); flag System.out.println("AC") System.out.println System.out System System.out "AC" System.out.println("WA") System.out.println System.out System System.out "WA" String args[] args
import java.util.*;

class Main{
	
	public static void main(String args[]){

		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		boolean flag = true;
		boolean C = false;
		for(int n=1;n<st.length();n++){
				if(!(0<=(st.charAt(n)-'a') &&(st.charAt(n)-'a')<=25)){
					if(!C && st.charAt(n) == 'C' && n!=1 && n!=st.length()-1) C = true;
					else flag = false;
				}
		}
		if(!C) flag = false;

		if(st.charAt(0) == 'A'){
		}else{
			flag = false;
		}

		if(flag) System.out.println("AC");
		else System.out.println("WA");

	}
}