import java.util.Scanner;

public class Main {
	public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.print(aCheck(s)&&cCheck(s)&&sCheck(s)?"AC":"WA");
	}
	private static boolean aCheck(String str){
		return str.matches("^A.*");
	}
	
	private static boolean cCheck(String str){
		return str.matches("^.{2}.*C.*.{1}$");
	}
	
	private static boolean sCheck(String str){
		return str.matches("^.[a-z]*C[a-z]*$");
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.print(aCheck(s)&&cCheck(s)&&sCheck(s)?"AC":"WA");
	}
	private static boolean aCheck(String str){
		return str.matches("^A.*");
	}
	
	private static boolean cCheck(String str){
		return str.matches("^.{2}.*C.*.{1}$");
	}
	
	private static boolean sCheck(String str){
		return str.matches("^.[a-z]*C[a-z]*$");
	}
} Main public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.print(aCheck(s)&&cCheck(s)&&sCheck(s)?"AC":"WA");
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.print(aCheck(s)&&cCheck(s)&&sCheck(s)?"AC":"WA");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc System.out.print(aCheck(s)&&cCheck(s)&&sCheck(s)?"AC":"WA") System.out.print System.out System System.out aCheck(s)&&cCheck(s)&&sCheck(s)?"AC":"WA" aCheck(s)&&cCheck(s)&&sCheck(s) aCheck(s)&&cCheck(s)&&sCheck(s) aCheck(s) aCheck s cCheck(s) cCheck s sCheck(s) sCheck s "AC" "WA" String[] arg arg private static boolean aCheck(String str){
		return str.matches("^A.*");
	} aCheck {
		return str.matches("^A.*");
	} return str.matches("^A.*"); str.matches("^A.*") str.matches str "^A.*" String str str private static boolean cCheck(String str){
		return str.matches("^.{2}.*C.*.{1}$");
	} cCheck {
		return str.matches("^.{2}.*C.*.{1}$");
	} return str.matches("^.{2}.*C.*.{1}$"); str.matches("^.{2}.*C.*.{1}$") str.matches str "^.{2}.*C.*.{1}$" String str str private static boolean sCheck(String str){
		return str.matches("^.[a-z]*C[a-z]*$");
	} sCheck {
		return str.matches("^.[a-z]*C[a-z]*$");
	} return str.matches("^.[a-z]*C[a-z]*$"); str.matches("^.[a-z]*C[a-z]*$") str.matches str "^.[a-z]*C[a-z]*$" String str str public class Main {
	public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.print(aCheck(s)&&cCheck(s)&&sCheck(s)?"AC":"WA");
	}
	private static boolean aCheck(String str){
		return str.matches("^A.*");
	}
	
	private static boolean cCheck(String str){
		return str.matches("^.{2}.*C.*.{1}$");
	}
	
	private static boolean sCheck(String str){
		return str.matches("^.[a-z]*C[a-z]*$");
	}
} public class Main {
	public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.print(aCheck(s)&&cCheck(s)&&sCheck(s)?"AC":"WA");
	}
	private static boolean aCheck(String str){
		return str.matches("^A.*");
	}
	
	private static boolean cCheck(String str){
		return str.matches("^.{2}.*C.*.{1}$");
	}
	
	private static boolean sCheck(String str){
		return str.matches("^.[a-z]*C[a-z]*$");
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		System.out.print(aCheck(s)&&cCheck(s)&&sCheck(s)?"AC":"WA");
	}
	private static boolean aCheck(String str){
		return str.matches("^A.*");
	}
	
	private static boolean cCheck(String str){
		return str.matches("^.{2}.*C.*.{1}$");
	}
	
	private static boolean sCheck(String str){
		return str.matches("^.[a-z]*C[a-z]*$");
	}
}
