import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();

		if (s.matches("^A[a-z][a-z]*C[a-z]*[a-z]")) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}

		sc.close();
	}
} 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();

		if (s.matches("^A[a-z][a-z]*C[a-z]*[a-z]")) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();

		if (s.matches("^A[a-z][a-z]*C[a-z]*[a-z]")) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();

		if (s.matches("^A[a-z][a-z]*C[a-z]*[a-z]")) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc if (s.matches("^A[a-z][a-z]*C[a-z]*[a-z]")) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		} s.matches("^A[a-z][a-z]*C[a-z]*[a-z]") s.matches s "^A[a-z][a-z]*C[a-z]*[a-z]" {
			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" sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();

		if (s.matches("^A[a-z][a-z]*C[a-z]*[a-z]")) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}

		sc.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();

		if (s.matches("^A[a-z][a-z]*C[a-z]*[a-z]")) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}

		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();

		if (s.matches("^A[a-z][a-z]*C[a-z]*[a-z]")) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}

		sc.close();
	}
}