import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;
 

//result = Math.pow(num1, num3)
//StringBuffer str = new StringBuffer(hoge1);
//String hoge2 = str.reverse().toString();
//map.containsKey(A)

//Map<String, Integer> map = new HashMap<String, Integer>(n);
/*for ( キーのデータ型 key : マップの名前.keySet() ) {
	データのデータ型 data = マップの名前.get( key );
	
	// keyやdataを使った処理;
}*/
//int i = Integer.parseInt(s);

//ArrayList<String> cc = new ArrayList<>(n);
//Collections.sort(list);
//Array.sort(list);
//Arrays.asList(c).contains("a")
//list.set(1,"walk");
public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	static void p(double ans) {System.out.println(ans);};
	static String s;
	static String g;
	static int a[]=new int[4];
	public static void main(String[] args) {
		int a=0;
		String S=sc.next();
		boolean aa=false;
		if(S.charAt(0)==65) {
			a=S.indexOf("C",2);
			int b=S.lastIndexOf("C",S.length()-2);
			if(a!=-1&&b!=-1) {
				if(a==b) {
					aa=true;
				}
			}
		}
		
		if(aa) {
			boolean wa=false;
			for(int i=0;i<S.length();i++) {
				if(i==0||i==a) {
					
				}else {
					if(!(S.charAt(i)>=97)) {
						wa=true;
					}
				}
				
			}
			if(wa) {
				p("WA");
			}else {
				p("AC");
			}
		}else {
			p("WA");
		}

	}
	static boolean dfs(int b,int sum,String v) {
		g=v;
		if(b==4)return sum==7;
		if(dfs(b+1,sum+a[b],v+"+"))return true;
		if(dfs(b+1,sum-a[b],v+"-"))return true;
		return false;
	}
	

	
	
	
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	static void p(double ans) {System.out.println(ans);};
	static String s;
	static String g;
	static int a[]=new int[4];
	public static void main(String[] args) {
		int a=0;
		String S=sc.next();
		boolean aa=false;
		if(S.charAt(0)==65) {
			a=S.indexOf("C",2);
			int b=S.lastIndexOf("C",S.length()-2);
			if(a!=-1&&b!=-1) {
				if(a==b) {
					aa=true;
				}
			}
		}
		
		if(aa) {
			boolean wa=false;
			for(int i=0;i<S.length();i++) {
				if(i==0||i==a) {
					
				}else {
					if(!(S.charAt(i)>=97)) {
						wa=true;
					}
				}
				
			}
			if(wa) {
				p("WA");
			}else {
				p("AC");
			}
		}else {
			p("WA");
		}

	}
	static boolean dfs(int b,int sum,String v) {
		g=v;
		if(b==4)return sum==7;
		if(dfs(b+1,sum+a[b],v+"+"))return true;
		if(dfs(b+1,sum-a[b],v+"-"))return true;
		return false;
	}
	

	
	
	
} Main private static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) static String s; s static String g; g static int a[]=new int[4]; a new int[4] 4 static void p(String ans) {System.out.println(ans);} p {System.out.println(ans);} System.out.println(ans) System.out.println System.out System System.out ans String ans ans static void p(int ans) {System.out.println(ans);} p {System.out.println(ans);} System.out.println(ans) System.out.println System.out System System.out ans int ans ans static void p(long ans) {System.out.println(ans);} p {System.out.println(ans);} System.out.println(ans) System.out.println System.out System System.out ans long ans ans static void p(double ans) {System.out.println(ans);} p {System.out.println(ans);} System.out.println(ans) System.out.println System.out System System.out ans double ans ans public static void main(String[] args) {
		int a=0;
		String S=sc.next();
		boolean aa=false;
		if(S.charAt(0)==65) {
			a=S.indexOf("C",2);
			int b=S.lastIndexOf("C",S.length()-2);
			if(a!=-1&&b!=-1) {
				if(a==b) {
					aa=true;
				}
			}
		}
		
		if(aa) {
			boolean wa=false;
			for(int i=0;i<S.length();i++) {
				if(i==0||i==a) {
					
				}else {
					if(!(S.charAt(i)>=97)) {
						wa=true;
					}
				}
				
			}
			if(wa) {
				p("WA");
			}else {
				p("AC");
			}
		}else {
			p("WA");
		}

	} main {
		int a=0;
		String S=sc.next();
		boolean aa=false;
		if(S.charAt(0)==65) {
			a=S.indexOf("C",2);
			int b=S.lastIndexOf("C",S.length()-2);
			if(a!=-1&&b!=-1) {
				if(a==b) {
					aa=true;
				}
			}
		}
		
		if(aa) {
			boolean wa=false;
			for(int i=0;i<S.length();i++) {
				if(i==0||i==a) {
					
				}else {
					if(!(S.charAt(i)>=97)) {
						wa=true;
					}
				}
				
			}
			if(wa) {
				p("WA");
			}else {
				p("AC");
			}
		}else {
			p("WA");
		}

	} int a=0; a 0 String S=sc.next(); S sc.next() sc.next sc boolean aa=false; aa false if(S.charAt(0)==65) {
			a=S.indexOf("C",2);
			int b=S.lastIndexOf("C",S.length()-2);
			if(a!=-1&&b!=-1) {
				if(a==b) {
					aa=true;
				}
			}
		} S.charAt(0)==65 S.charAt(0) S.charAt S 0 65 {
			a=S.indexOf("C",2);
			int b=S.lastIndexOf("C",S.length()-2);
			if(a!=-1&&b!=-1) {
				if(a==b) {
					aa=true;
				}
			}
		} a=S.indexOf("C",2) a S.indexOf("C",2) S.indexOf S "C" 2 int b=S.lastIndexOf("C",S.length()-2); b S.lastIndexOf("C",S.length()-2) S.lastIndexOf S "C" S.length()-2 S.length() S.length S 2 if(a!=-1&&b!=-1) {
				if(a==b) {
					aa=true;
				}
			} a!=-1&&b!=-1 a!=-1 a -1 1 b!=-1 b -1 1 {
				if(a==b) {
					aa=true;
				}
			} if(a==b) {
					aa=true;
				} a==b a b {
					aa=true;
				} aa=true aa true if(aa) {
			boolean wa=false;
			for(int i=0;i<S.length();i++) {
				if(i==0||i==a) {
					
				}else {
					if(!(S.charAt(i)>=97)) {
						wa=true;
					}
				}
				
			}
			if(wa) {
				p("WA");
			}else {
				p("AC");
			}
		}else {
			p("WA");
		} aa {
			boolean wa=false;
			for(int i=0;i<S.length();i++) {
				if(i==0||i==a) {
					
				}else {
					if(!(S.charAt(i)>=97)) {
						wa=true;
					}
				}
				
			}
			if(wa) {
				p("WA");
			}else {
				p("AC");
			}
		} boolean wa=false; wa false for(int i=0;i<S.length();i++) {
				if(i==0||i==a) {
					
				}else {
					if(!(S.charAt(i)>=97)) {
						wa=true;
					}
				}
				
			} int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
				if(i==0||i==a) {
					
				}else {
					if(!(S.charAt(i)>=97)) {
						wa=true;
					}
				}
				
			} {
				if(i==0||i==a) {
					
				}else {
					if(!(S.charAt(i)>=97)) {
						wa=true;
					}
				}
				
			} if(i==0||i==a) {
					
				}else {
					if(!(S.charAt(i)>=97)) {
						wa=true;
					}
				} i==0||i==a i==0 i 0 i==a i a {
					
				} {
					if(!(S.charAt(i)>=97)) {
						wa=true;
					}
				} if(!(S.charAt(i)>=97)) {
						wa=true;
					} !(S.charAt(i)>=97) (S.charAt(i)>=97) S.charAt(i) S.charAt S i 97 {
						wa=true;
					} wa=true wa true if(wa) {
				p("WA");
			}else {
				p("AC");
			} wa {
				p("WA");
			} p("WA") p "WA" {
				p("AC");
			} p("AC") p "AC" {
			p("WA");
		} p("WA") p "WA" String[] args args static boolean dfs(int b,int sum,String v) {
		g=v;
		if(b==4)return sum==7;
		if(dfs(b+1,sum+a[b],v+"+"))return true;
		if(dfs(b+1,sum-a[b],v+"-"))return true;
		return false;
	} dfs {
		g=v;
		if(b==4)return sum==7;
		if(dfs(b+1,sum+a[b],v+"+"))return true;
		if(dfs(b+1,sum-a[b],v+"-"))return true;
		return false;
	} g=v g v if(b==4)return sum==7; b==4 b 4 return sum==7; sum==7 sum 7 if(dfs(b+1,sum+a[b],v+"+"))return true; dfs(b+1,sum+a[b],v+"+") dfs b+1 b 1 sum+a[b] sum a[b] a b v+"+" v "+" return true; true if(dfs(b+1,sum-a[b],v+"-"))return true; dfs(b+1,sum-a[b],v+"-") dfs b+1 b 1 sum-a[b] sum a[b] a b v+"-" v "-" return true; true return false; false int b b int sum sum String v v public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	static void p(double ans) {System.out.println(ans);};
	static String s;
	static String g;
	static int a[]=new int[4];
	public static void main(String[] args) {
		int a=0;
		String S=sc.next();
		boolean aa=false;
		if(S.charAt(0)==65) {
			a=S.indexOf("C",2);
			int b=S.lastIndexOf("C",S.length()-2);
			if(a!=-1&&b!=-1) {
				if(a==b) {
					aa=true;
				}
			}
		}
		
		if(aa) {
			boolean wa=false;
			for(int i=0;i<S.length();i++) {
				if(i==0||i==a) {
					
				}else {
					if(!(S.charAt(i)>=97)) {
						wa=true;
					}
				}
				
			}
			if(wa) {
				p("WA");
			}else {
				p("AC");
			}
		}else {
			p("WA");
		}

	}
	static boolean dfs(int b,int sum,String v) {
		g=v;
		if(b==4)return sum==7;
		if(dfs(b+1,sum+a[b],v+"+"))return true;
		if(dfs(b+1,sum-a[b],v+"-"))return true;
		return false;
	}
	

	
	
	
} public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	static void p(double ans) {System.out.println(ans);};
	static String s;
	static String g;
	static int a[]=new int[4];
	public static void main(String[] args) {
		int a=0;
		String S=sc.next();
		boolean aa=false;
		if(S.charAt(0)==65) {
			a=S.indexOf("C",2);
			int b=S.lastIndexOf("C",S.length()-2);
			if(a!=-1&&b!=-1) {
				if(a==b) {
					aa=true;
				}
			}
		}
		
		if(aa) {
			boolean wa=false;
			for(int i=0;i<S.length();i++) {
				if(i==0||i==a) {
					
				}else {
					if(!(S.charAt(i)>=97)) {
						wa=true;
					}
				}
				
			}
			if(wa) {
				p("WA");
			}else {
				p("AC");
			}
		}else {
			p("WA");
		}

	}
	static boolean dfs(int b,int sum,String v) {
		g=v;
		if(b==4)return sum==7;
		if(dfs(b+1,sum+a[b],v+"+"))return true;
		if(dfs(b+1,sum-a[b],v+"-"))return true;
		return false;
	}
	

	
	
	
} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;
 

//result = Math.pow(num1, num3)
//StringBuffer str = new StringBuffer(hoge1);
//String hoge2 = str.reverse().toString();
//map.containsKey(A)

//Map<String, Integer> map = new HashMap<String, Integer>(n);
/*for ( キーのデータ型 key : マップの名前.keySet() ) {
	データのデータ型 data = マップの名前.get( key );
	
	// keyやdataを使った処理;
}*/
//int i = Integer.parseInt(s);

//ArrayList<String> cc = new ArrayList<>(n);
//Collections.sort(list);
//Array.sort(list);
//Arrays.asList(c).contains("a")
//list.set(1,"walk");
public class Main {
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	static void p(double ans) {System.out.println(ans);};
	static String s;
	static String g;
	static int a[]=new int[4];
	public static void main(String[] args) {
		int a=0;
		String S=sc.next();
		boolean aa=false;
		if(S.charAt(0)==65) {
			a=S.indexOf("C",2);
			int b=S.lastIndexOf("C",S.length()-2);
			if(a!=-1&&b!=-1) {
				if(a==b) {
					aa=true;
				}
			}
		}
		
		if(aa) {
			boolean wa=false;
			for(int i=0;i<S.length();i++) {
				if(i==0||i==a) {
					
				}else {
					if(!(S.charAt(i)>=97)) {
						wa=true;
					}
				}
				
			}
			if(wa) {
				p("WA");
			}else {
				p("AC");
			}
		}else {
			p("WA");
		}

	}
	static boolean dfs(int b,int sum,String v) {
		g=v;
		if(b==4)return sum==7;
		if(dfs(b+1,sum+a[b],v+"+"))return true;
		if(dfs(b+1,sum-a[b],v+"-"))return true;
		return false;
	}
	

	
	
	
}
