import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String s = sc.next();
		
		// 計算
		String result = "AC";
		if(s.charAt(0) != 'A') result = "WA";
		boolean flg = false;
		for(int i = 1; i < s.length(); i++){
		    if(Character.isUpperCase(s.charAt(i))){
		        if(i >= 2 && s.length()-2 >= i && s.charAt(i) == 'C' && !flg){
		            flg = true;
		        }else{
		            result = "WA";
		        }
		    }
		}
		if(!flg) result = "WA";
		
		// 出力
		System.out.println(result);
	}
} import java.util.*; util.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import java.math.BigInteger; BigInteger java.math public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String s = sc.next();
		
		// 計算
		String result = "AC";
		if(s.charAt(0) != 'A') result = "WA";
		boolean flg = false;
		for(int i = 1; i < s.length(); i++){
		    if(Character.isUpperCase(s.charAt(i))){
		        if(i >= 2 && s.length()-2 >= i && s.charAt(i) == 'C' && !flg){
		            flg = true;
		        }else{
		            result = "WA";
		        }
		    }
		}
		if(!flg) result = "WA";
		
		// 出力
		System.out.println(result);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String s = sc.next();
		
		// 計算
		String result = "AC";
		if(s.charAt(0) != 'A') result = "WA";
		boolean flg = false;
		for(int i = 1; i < s.length(); i++){
		    if(Character.isUpperCase(s.charAt(i))){
		        if(i >= 2 && s.length()-2 >= i && s.charAt(i) == 'C' && !flg){
		            flg = true;
		        }else{
		            result = "WA";
		        }
		    }
		}
		if(!flg) result = "WA";
		
		// 出力
		System.out.println(result);
	} main {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String s = sc.next();
		
		// 計算
		String result = "AC";
		if(s.charAt(0) != 'A') result = "WA";
		boolean flg = false;
		for(int i = 1; i < s.length(); i++){
		    if(Character.isUpperCase(s.charAt(i))){
		        if(i >= 2 && s.length()-2 >= i && s.charAt(i) == 'C' && !flg){
		            flg = true;
		        }else{
		            result = "WA";
		        }
		    }
		}
		if(!flg) result = "WA";
		
		// 出力
		System.out.println(result);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String result = "AC"; result "AC" if(s.charAt(0) != 'A') result = "WA"; s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' result = "WA" result "WA" boolean flg = false; flg false for(int i = 1; i < s.length(); i++){
		    if(Character.isUpperCase(s.charAt(i))){
		        if(i >= 2 && s.length()-2 >= i && s.charAt(i) == 'C' && !flg){
		            flg = true;
		        }else{
		            result = "WA";
		        }
		    }
		} int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
		    if(Character.isUpperCase(s.charAt(i))){
		        if(i >= 2 && s.length()-2 >= i && s.charAt(i) == 'C' && !flg){
		            flg = true;
		        }else{
		            result = "WA";
		        }
		    }
		} {
		    if(Character.isUpperCase(s.charAt(i))){
		        if(i >= 2 && s.length()-2 >= i && s.charAt(i) == 'C' && !flg){
		            flg = true;
		        }else{
		            result = "WA";
		        }
		    }
		} if(Character.isUpperCase(s.charAt(i))){
		        if(i >= 2 && s.length()-2 >= i && s.charAt(i) == 'C' && !flg){
		            flg = true;
		        }else{
		            result = "WA";
		        }
		    } Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i {
		        if(i >= 2 && s.length()-2 >= i && s.charAt(i) == 'C' && !flg){
		            flg = true;
		        }else{
		            result = "WA";
		        }
		    } if(i >= 2 && s.length()-2 >= i && s.charAt(i) == 'C' && !flg){
		            flg = true;
		        }else{
		            result = "WA";
		        } i >= 2 && s.length()-2 >= i && s.charAt(i) == 'C' && !flg s.charAt(i) == 'C' i >= 2 && s.length()-2 >= i && s.charAt(i) == 'C' && !flg i >= 2 i 2 s.length()-2 >= i s.length()-2 s.length() s.length s 2 i s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' !flg flg {
		            flg = true;
		        } flg = true flg true {
		            result = "WA";
		        } result = "WA" result "WA" if(!flg) result = "WA"; !flg flg result = "WA" result "WA" System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String s = sc.next();
		
		// 計算
		String result = "AC";
		if(s.charAt(0) != 'A') result = "WA";
		boolean flg = false;
		for(int i = 1; i < s.length(); i++){
		    if(Character.isUpperCase(s.charAt(i))){
		        if(i >= 2 && s.length()-2 >= i && s.charAt(i) == 'C' && !flg){
		            flg = true;
		        }else{
		            result = "WA";
		        }
		    }
		}
		if(!flg) result = "WA";
		
		// 出力
		System.out.println(result);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String s = sc.next();
		
		// 計算
		String result = "AC";
		if(s.charAt(0) != 'A') result = "WA";
		boolean flg = false;
		for(int i = 1; i < s.length(); i++){
		    if(Character.isUpperCase(s.charAt(i))){
		        if(i >= 2 && s.length()-2 >= i && s.charAt(i) == 'C' && !flg){
		            flg = true;
		        }else{
		            result = "WA";
		        }
		    }
		}
		if(!flg) result = "WA";
		
		// 出力
		System.out.println(result);
	}
} Main
import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		String s = sc.next();
		
		// 計算
		String result = "AC";
		if(s.charAt(0) != 'A') result = "WA";
		boolean flg = false;
		for(int i = 1; i < s.length(); i++){
		    if(Character.isUpperCase(s.charAt(i))){
		        if(i >= 2 && s.length()-2 >= i && s.charAt(i) == 'C' && !flg){
		            flg = true;
		        }else{
		            result = "WA";
		        }
		    }
		}
		if(!flg) result = "WA";
		
		// 出力
		System.out.println(result);
	}
}
