import java.util.*;
public class Main{
	static String ACJudge(String s){
		if(s.charAt(0)!='A')return "WA";
		int count = 0;
		int idx = 0;
		for(int i=2; i<s.length()-1; i++){
			if(s.charAt(i)=='C'){
				count++;
				idx = i;
			}
		}
		if(count!=1)return "WA";
		String t = s.toLowerCase();
		if(!s.substring(1, idx).equals(t.substring(1, idx)))return "WA";
		if(!s.substring(idx+1).equals(t.substring(idx+1)))return "WA";
		return "AC";
	}

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		System.out.println(ACJudge(st));
	}
} import java.util.*; util.* java public class Main{
	static String ACJudge(String s){
		if(s.charAt(0)!='A')return "WA";
		int count = 0;
		int idx = 0;
		for(int i=2; i<s.length()-1; i++){
			if(s.charAt(i)=='C'){
				count++;
				idx = i;
			}
		}
		if(count!=1)return "WA";
		String t = s.toLowerCase();
		if(!s.substring(1, idx).equals(t.substring(1, idx)))return "WA";
		if(!s.substring(idx+1).equals(t.substring(idx+1)))return "WA";
		return "AC";
	}

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		System.out.println(ACJudge(st));
	}
} Main static String ACJudge(String s){
		if(s.charAt(0)!='A')return "WA";
		int count = 0;
		int idx = 0;
		for(int i=2; i<s.length()-1; i++){
			if(s.charAt(i)=='C'){
				count++;
				idx = i;
			}
		}
		if(count!=1)return "WA";
		String t = s.toLowerCase();
		if(!s.substring(1, idx).equals(t.substring(1, idx)))return "WA";
		if(!s.substring(idx+1).equals(t.substring(idx+1)))return "WA";
		return "AC";
	} ACJudge {
		if(s.charAt(0)!='A')return "WA";
		int count = 0;
		int idx = 0;
		for(int i=2; i<s.length()-1; i++){
			if(s.charAt(i)=='C'){
				count++;
				idx = i;
			}
		}
		if(count!=1)return "WA";
		String t = s.toLowerCase();
		if(!s.substring(1, idx).equals(t.substring(1, idx)))return "WA";
		if(!s.substring(idx+1).equals(t.substring(idx+1)))return "WA";
		return "AC";
	} if(s.charAt(0)!='A')return "WA"; s.charAt(0)!='A' s.charAt(0) s.charAt s 0 'A' return "WA"; "WA" int count = 0; count 0 int idx = 0; idx 0 for(int i=2; i<s.length()-1; i++){
			if(s.charAt(i)=='C'){
				count++;
				idx = 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'){
				count++;
				idx = i;
			}
		} {
			if(s.charAt(i)=='C'){
				count++;
				idx = i;
			}
		} if(s.charAt(i)=='C'){
				count++;
				idx = i;
			} s.charAt(i)=='C' s.charAt(i) s.charAt s i 'C' {
				count++;
				idx = i;
			} count++ count idx = i idx i if(count!=1)return "WA"; count!=1 count 1 return "WA"; "WA" String t = s.toLowerCase(); t s.toLowerCase() s.toLowerCase s if(!s.substring(1, idx).equals(t.substring(1, idx)))return "WA"; !s.substring(1, idx).equals(t.substring(1, idx)) s.substring(1, idx).equals(t.substring(1, idx)) s.substring(1, idx).equals s.substring(1, idx) s.substring s 1 idx t.substring(1, idx) t.substring t 1 idx return "WA"; "WA" if(!s.substring(idx+1).equals(t.substring(idx+1)))return "WA"; !s.substring(idx+1).equals(t.substring(idx+1)) s.substring(idx+1).equals(t.substring(idx+1)) s.substring(idx+1).equals s.substring(idx+1) s.substring s idx+1 idx 1 t.substring(idx+1) t.substring t idx+1 idx 1 return "WA"; "WA" return "AC"; "AC" String s s public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		System.out.println(ACJudge(st));
	} main {
		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		System.out.println(ACJudge(st));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String st = sc.next(); st sc.next() sc.next sc System.out.println(ACJudge(st)) System.out.println System.out System System.out ACJudge(st) ACJudge st String[] args args public class Main{
	static String ACJudge(String s){
		if(s.charAt(0)!='A')return "WA";
		int count = 0;
		int idx = 0;
		for(int i=2; i<s.length()-1; i++){
			if(s.charAt(i)=='C'){
				count++;
				idx = i;
			}
		}
		if(count!=1)return "WA";
		String t = s.toLowerCase();
		if(!s.substring(1, idx).equals(t.substring(1, idx)))return "WA";
		if(!s.substring(idx+1).equals(t.substring(idx+1)))return "WA";
		return "AC";
	}

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		System.out.println(ACJudge(st));
	}
} public class Main{
	static String ACJudge(String s){
		if(s.charAt(0)!='A')return "WA";
		int count = 0;
		int idx = 0;
		for(int i=2; i<s.length()-1; i++){
			if(s.charAt(i)=='C'){
				count++;
				idx = i;
			}
		}
		if(count!=1)return "WA";
		String t = s.toLowerCase();
		if(!s.substring(1, idx).equals(t.substring(1, idx)))return "WA";
		if(!s.substring(idx+1).equals(t.substring(idx+1)))return "WA";
		return "AC";
	}

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		System.out.println(ACJudge(st));
	}
} Main
import java.util.*;
public class Main{
	static String ACJudge(String s){
		if(s.charAt(0)!='A')return "WA";
		int count = 0;
		int idx = 0;
		for(int i=2; i<s.length()-1; i++){
			if(s.charAt(i)=='C'){
				count++;
				idx = i;
			}
		}
		if(count!=1)return "WA";
		String t = s.toLowerCase();
		if(!s.substring(1, idx).equals(t.substring(1, idx)))return "WA";
		if(!s.substring(idx+1).equals(t.substring(idx+1)))return "WA";
		return "AC";
	}

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String st = sc.next();
		System.out.println(ACJudge(st));
	}
}