import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String str = sc.next();
		// スペース区切りの整数の入力
		
		String aa = str.substring(0,1);
		String cc = str.substring(2);
		cc =cc.substring(0, cc.length() -1);
		int indA = str.indexOf("A");
		int indC = str.indexOf("C");
		int lastIndA = str.lastIndexOf("A");
		int lastIndC = str.lastIndexOf("C");

		// System.out.println(indA);
		// System.out.println(indC);
		// System.out.println(lastIndA);
		// System.out.println(lastIndC);
		// 		System.out.println(indA==1);
		// System.out.println(cc.contains("C"));
		// System.out.println(lastIndA==indA);
		// System.out.println(lastIndC==indC);
		if(indA==0&&cc.contains("C")&&(lastIndA==indA)&&lastIndC==indC){
			boolean flag =false;
			String lowerStr=str.replace("A","a");
			lowerStr= lowerStr.replace("C","c");
			flag = isLower(lowerStr);
			// System.out.println(lowerStr);
			if(flag){
				System.out.println("AC");
			}else{
				System.out.println("WA");
			}
		}else{
			System.out.println("WA");
		}
	}

	public static boolean isLower(String str) {
		return str.equals(str.toLowerCase());
	}

} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String str = sc.next();
		// スペース区切りの整数の入力
		
		String aa = str.substring(0,1);
		String cc = str.substring(2);
		cc =cc.substring(0, cc.length() -1);
		int indA = str.indexOf("A");
		int indC = str.indexOf("C");
		int lastIndA = str.lastIndexOf("A");
		int lastIndC = str.lastIndexOf("C");

		// System.out.println(indA);
		// System.out.println(indC);
		// System.out.println(lastIndA);
		// System.out.println(lastIndC);
		// 		System.out.println(indA==1);
		// System.out.println(cc.contains("C"));
		// System.out.println(lastIndA==indA);
		// System.out.println(lastIndC==indC);
		if(indA==0&&cc.contains("C")&&(lastIndA==indA)&&lastIndC==indC){
			boolean flag =false;
			String lowerStr=str.replace("A","a");
			lowerStr= lowerStr.replace("C","c");
			flag = isLower(lowerStr);
			// System.out.println(lowerStr);
			if(flag){
				System.out.println("AC");
			}else{
				System.out.println("WA");
			}
		}else{
			System.out.println("WA");
		}
	}

	public static boolean isLower(String str) {
		return str.equals(str.toLowerCase());
	}

} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String str = sc.next();
		// スペース区切りの整数の入力
		
		String aa = str.substring(0,1);
		String cc = str.substring(2);
		cc =cc.substring(0, cc.length() -1);
		int indA = str.indexOf("A");
		int indC = str.indexOf("C");
		int lastIndA = str.lastIndexOf("A");
		int lastIndC = str.lastIndexOf("C");

		// System.out.println(indA);
		// System.out.println(indC);
		// System.out.println(lastIndA);
		// System.out.println(lastIndC);
		// 		System.out.println(indA==1);
		// System.out.println(cc.contains("C"));
		// System.out.println(lastIndA==indA);
		// System.out.println(lastIndC==indC);
		if(indA==0&&cc.contains("C")&&(lastIndA==indA)&&lastIndC==indC){
			boolean flag =false;
			String lowerStr=str.replace("A","a");
			lowerStr= lowerStr.replace("C","c");
			flag = isLower(lowerStr);
			// System.out.println(lowerStr);
			if(flag){
				System.out.println("AC");
			}else{
				System.out.println("WA");
			}
		}else{
			System.out.println("WA");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String str = sc.next();
		// スペース区切りの整数の入力
		
		String aa = str.substring(0,1);
		String cc = str.substring(2);
		cc =cc.substring(0, cc.length() -1);
		int indA = str.indexOf("A");
		int indC = str.indexOf("C");
		int lastIndA = str.lastIndexOf("A");
		int lastIndC = str.lastIndexOf("C");

		// System.out.println(indA);
		// System.out.println(indC);
		// System.out.println(lastIndA);
		// System.out.println(lastIndC);
		// 		System.out.println(indA==1);
		// System.out.println(cc.contains("C"));
		// System.out.println(lastIndA==indA);
		// System.out.println(lastIndC==indC);
		if(indA==0&&cc.contains("C")&&(lastIndA==indA)&&lastIndC==indC){
			boolean flag =false;
			String lowerStr=str.replace("A","a");
			lowerStr= lowerStr.replace("C","c");
			flag = isLower(lowerStr);
			// System.out.println(lowerStr);
			if(flag){
				System.out.println("AC");
			}else{
				System.out.println("WA");
			}
		}else{
			System.out.println("WA");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc String aa = str.substring(0,1); aa str.substring(0,1) str.substring str 0 1 String cc = str.substring(2); cc str.substring(2) str.substring str 2 cc =cc.substring(0, cc.length() -1) cc cc.substring(0, cc.length() -1) cc.substring cc 0 cc.length() -1 cc.length() cc.length cc 1 int indA = str.indexOf("A"); indA str.indexOf("A") str.indexOf str "A" int indC = str.indexOf("C"); indC str.indexOf("C") str.indexOf str "C" int lastIndA = str.lastIndexOf("A"); lastIndA str.lastIndexOf("A") str.lastIndexOf str "A" int lastIndC = str.lastIndexOf("C"); lastIndC str.lastIndexOf("C") str.lastIndexOf str "C" if(indA==0&&cc.contains("C")&&(lastIndA==indA)&&lastIndC==indC){
			boolean flag =false;
			String lowerStr=str.replace("A","a");
			lowerStr= lowerStr.replace("C","c");
			flag = isLower(lowerStr);
			// System.out.println(lowerStr);
			if(flag){
				System.out.println("AC");
			}else{
				System.out.println("WA");
			}
		}else{
			System.out.println("WA");
		} indA==0&&cc.contains("C")&&(lastIndA==indA)&&lastIndC==indC (lastIndA==indA) indA==0&&cc.contains("C")&&(lastIndA==indA)&&lastIndC==indC indA==0 indA 0 cc.contains("C") cc.contains cc "C" (lastIndA==indA) lastIndA indA lastIndC==indC lastIndC indC {
			boolean flag =false;
			String lowerStr=str.replace("A","a");
			lowerStr= lowerStr.replace("C","c");
			flag = isLower(lowerStr);
			// System.out.println(lowerStr);
			if(flag){
				System.out.println("AC");
			}else{
				System.out.println("WA");
			}
		} boolean flag =false; flag false String lowerStr=str.replace("A","a"); lowerStr str.replace("A","a") str.replace str "A" "a" lowerStr= lowerStr.replace("C","c") lowerStr lowerStr.replace("C","c") lowerStr.replace lowerStr "C" "c" flag = isLower(lowerStr) flag isLower(lowerStr) isLower lowerStr if(flag){
				System.out.println("AC");
			}else{
				System.out.println("WA");
			} flag {
				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" {
			System.out.println("WA");
		} System.out.println("WA") System.out.println System.out System System.out "WA" String[] args args public static boolean isLower(String str) {
		return str.equals(str.toLowerCase());
	} isLower {
		return str.equals(str.toLowerCase());
	} return str.equals(str.toLowerCase()); str.equals(str.toLowerCase()) str.equals str str.toLowerCase() str.toLowerCase str String str str public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String str = sc.next();
		// スペース区切りの整数の入力
		
		String aa = str.substring(0,1);
		String cc = str.substring(2);
		cc =cc.substring(0, cc.length() -1);
		int indA = str.indexOf("A");
		int indC = str.indexOf("C");
		int lastIndA = str.lastIndexOf("A");
		int lastIndC = str.lastIndexOf("C");

		// System.out.println(indA);
		// System.out.println(indC);
		// System.out.println(lastIndA);
		// System.out.println(lastIndC);
		// 		System.out.println(indA==1);
		// System.out.println(cc.contains("C"));
		// System.out.println(lastIndA==indA);
		// System.out.println(lastIndC==indC);
		if(indA==0&&cc.contains("C")&&(lastIndA==indA)&&lastIndC==indC){
			boolean flag =false;
			String lowerStr=str.replace("A","a");
			lowerStr= lowerStr.replace("C","c");
			flag = isLower(lowerStr);
			// System.out.println(lowerStr);
			if(flag){
				System.out.println("AC");
			}else{
				System.out.println("WA");
			}
		}else{
			System.out.println("WA");
		}
	}

	public static boolean isLower(String str) {
		return str.equals(str.toLowerCase());
	}

} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String str = sc.next();
		// スペース区切りの整数の入力
		
		String aa = str.substring(0,1);
		String cc = str.substring(2);
		cc =cc.substring(0, cc.length() -1);
		int indA = str.indexOf("A");
		int indC = str.indexOf("C");
		int lastIndA = str.lastIndexOf("A");
		int lastIndC = str.lastIndexOf("C");

		// System.out.println(indA);
		// System.out.println(indC);
		// System.out.println(lastIndA);
		// System.out.println(lastIndC);
		// 		System.out.println(indA==1);
		// System.out.println(cc.contains("C"));
		// System.out.println(lastIndA==indA);
		// System.out.println(lastIndC==indC);
		if(indA==0&&cc.contains("C")&&(lastIndA==indA)&&lastIndC==indC){
			boolean flag =false;
			String lowerStr=str.replace("A","a");
			lowerStr= lowerStr.replace("C","c");
			flag = isLower(lowerStr);
			// System.out.println(lowerStr);
			if(flag){
				System.out.println("AC");
			}else{
				System.out.println("WA");
			}
		}else{
			System.out.println("WA");
		}
	}

	public static boolean isLower(String str) {
		return str.equals(str.toLowerCase());
	}

} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		String str = sc.next();
		// スペース区切りの整数の入力
		
		String aa = str.substring(0,1);
		String cc = str.substring(2);
		cc =cc.substring(0, cc.length() -1);
		int indA = str.indexOf("A");
		int indC = str.indexOf("C");
		int lastIndA = str.lastIndexOf("A");
		int lastIndC = str.lastIndexOf("C");

		// System.out.println(indA);
		// System.out.println(indC);
		// System.out.println(lastIndA);
		// System.out.println(lastIndC);
		// 		System.out.println(indA==1);
		// System.out.println(cc.contains("C"));
		// System.out.println(lastIndA==indA);
		// System.out.println(lastIndC==indC);
		if(indA==0&&cc.contains("C")&&(lastIndA==indA)&&lastIndC==indC){
			boolean flag =false;
			String lowerStr=str.replace("A","a");
			lowerStr= lowerStr.replace("C","c");
			flag = isLower(lowerStr);
			// System.out.println(lowerStr);
			if(flag){
				System.out.println("AC");
			}else{
				System.out.println("WA");
			}
		}else{
			System.out.println("WA");
		}
	}

	public static boolean isLower(String str) {
		return str.equals(str.toLowerCase());
	}

}