import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String regString = "^A[a-z]*C[a-z]*";
		String regString2 = "[a-z]*C[a-z]*";
		String t = s.substring(2, s.length()-1);

		if (s.matches(regString)&&t.matches(regString2)) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	}


}
 import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String regString = "^A[a-z]*C[a-z]*";
		String regString2 = "[a-z]*C[a-z]*";
		String t = s.substring(2, s.length()-1);

		if (s.matches(regString)&&t.matches(regString2)) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	}


} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String regString = "^A[a-z]*C[a-z]*";
		String regString2 = "[a-z]*C[a-z]*";
		String t = s.substring(2, s.length()-1);

		if (s.matches(regString)&&t.matches(regString2)) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String regString = "^A[a-z]*C[a-z]*";
		String regString2 = "[a-z]*C[a-z]*";
		String t = s.substring(2, s.length()-1);

		if (s.matches(regString)&&t.matches(regString2)) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String regString = "^A[a-z]*C[a-z]*"; regString "^A[a-z]*C[a-z]*" String regString2 = "[a-z]*C[a-z]*"; regString2 "[a-z]*C[a-z]*" String t = s.substring(2, s.length()-1); t s.substring(2, s.length()-1) s.substring s 2 s.length()-1 s.length() s.length s 1 if (s.matches(regString)&&t.matches(regString2)) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		} s.matches(regString)&&t.matches(regString2) s.matches(regString) s.matches s regString t.matches(regString2) t.matches t regString2 {
			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);
		String s = sc.next();
		String regString = "^A[a-z]*C[a-z]*";
		String regString2 = "[a-z]*C[a-z]*";
		String t = s.substring(2, s.length()-1);

		if (s.matches(regString)&&t.matches(regString2)) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	}


} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String regString = "^A[a-z]*C[a-z]*";
		String regString2 = "[a-z]*C[a-z]*";
		String t = s.substring(2, s.length()-1);

		if (s.matches(regString)&&t.matches(regString2)) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	}


} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String regString = "^A[a-z]*C[a-z]*";
		String regString2 = "[a-z]*C[a-z]*";
		String t = s.substring(2, s.length()-1);

		if (s.matches(regString)&&t.matches(regString2)) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}

	}


}

