import java.util.Scanner;
import java.util.regex.*;
import java.math.*;

public class Main {
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		//int a = sc.nextInt();
		// スペース区切りの整数の入力
		//int b = sc.nextInt();
		//int c = sc.nextInt();
		// 文字列の入力
		//String s = sc.next();
		//1文字ずつ
		//s.atChar(i);
		// 出力
		//System.out.println("");
		//double countx=0;
	
		String S;
		S=sc.next();
		int leng =S.length();
		//boolean x=false;
		Pattern p= Pattern.compile("^A[a-z][a-z]*C[a-z]*[a-z]$");
		Matcher m = p.matcher(S);
		boolean b = m.matches();
		
		if(b){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	
	
	}
} import java.util.Scanner; Scanner java.util import java.util.regex.*; regex.* java.util import java.math.*; math.* java public class Main {
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		//int a = sc.nextInt();
		// スペース区切りの整数の入力
		//int b = sc.nextInt();
		//int c = sc.nextInt();
		// 文字列の入力
		//String s = sc.next();
		//1文字ずつ
		//s.atChar(i);
		// 出力
		//System.out.println("");
		//double countx=0;
	
		String S;
		S=sc.next();
		int leng =S.length();
		//boolean x=false;
		Pattern p= Pattern.compile("^A[a-z][a-z]*C[a-z]*[a-z]$");
		Matcher m = p.matcher(S);
		boolean b = m.matches();
		
		if(b){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	
	
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		//int a = sc.nextInt();
		// スペース区切りの整数の入力
		//int b = sc.nextInt();
		//int c = sc.nextInt();
		// 文字列の入力
		//String s = sc.next();
		//1文字ずつ
		//s.atChar(i);
		// 出力
		//System.out.println("");
		//double countx=0;
	
		String S;
		S=sc.next();
		int leng =S.length();
		//boolean x=false;
		Pattern p= Pattern.compile("^A[a-z][a-z]*C[a-z]*[a-z]$");
		Matcher m = p.matcher(S);
		boolean b = m.matches();
		
		if(b){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	
	
	} main {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		//int a = sc.nextInt();
		// スペース区切りの整数の入力
		//int b = sc.nextInt();
		//int c = sc.nextInt();
		// 文字列の入力
		//String s = sc.next();
		//1文字ずつ
		//s.atChar(i);
		// 出力
		//System.out.println("");
		//double countx=0;
	
		String S;
		S=sc.next();
		int leng =S.length();
		//boolean x=false;
		Pattern p= Pattern.compile("^A[a-z][a-z]*C[a-z]*[a-z]$");
		Matcher m = p.matcher(S);
		boolean b = m.matches();
		
		if(b){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	
	
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S; S S=sc.next() S sc.next() sc.next sc int leng =S.length(); leng S.length() S.length S Pattern p= Pattern.compile("^A[a-z][a-z]*C[a-z]*[a-z]$"); p Pattern.compile("^A[a-z][a-z]*C[a-z]*[a-z]$") Pattern.compile Pattern "^A[a-z][a-z]*C[a-z]*[a-z]$" Matcher m = p.matcher(S); m p.matcher(S) p.matcher p S boolean b = m.matches(); b m.matches() m.matches m if(b){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		} b {
			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" String[] args args public class Main {
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		//int a = sc.nextInt();
		// スペース区切りの整数の入力
		//int b = sc.nextInt();
		//int c = sc.nextInt();
		// 文字列の入力
		//String s = sc.next();
		//1文字ずつ
		//s.atChar(i);
		// 出力
		//System.out.println("");
		//double countx=0;
	
		String S;
		S=sc.next();
		int leng =S.length();
		//boolean x=false;
		Pattern p= Pattern.compile("^A[a-z][a-z]*C[a-z]*[a-z]$");
		Matcher m = p.matcher(S);
		boolean b = m.matches();
		
		if(b){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	
	
	}
} public class Main {
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		//int a = sc.nextInt();
		// スペース区切りの整数の入力
		//int b = sc.nextInt();
		//int c = sc.nextInt();
		// 文字列の入力
		//String s = sc.next();
		//1文字ずつ
		//s.atChar(i);
		// 出力
		//System.out.println("");
		//double countx=0;
	
		String S;
		S=sc.next();
		int leng =S.length();
		//boolean x=false;
		Pattern p= Pattern.compile("^A[a-z][a-z]*C[a-z]*[a-z]$");
		Matcher m = p.matcher(S);
		boolean b = m.matches();
		
		if(b){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	
	
	}
} Main
import java.util.Scanner;
import java.util.regex.*;
import java.math.*;

public class Main {
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		//int a = sc.nextInt();
		// スペース区切りの整数の入力
		//int b = sc.nextInt();
		//int c = sc.nextInt();
		// 文字列の入力
		//String s = sc.next();
		//1文字ずつ
		//s.atChar(i);
		// 出力
		//System.out.println("");
		//double countx=0;
	
		String S;
		S=sc.next();
		int leng =S.length();
		//boolean x=false;
		Pattern p= Pattern.compile("^A[a-z][a-z]*C[a-z]*[a-z]$");
		Matcher m = p.matcher(S);
		boolean b = m.matches();
		
		if(b){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	
	
	}
}