import java.util.Scanner;

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

		if (!(s.charAt(0) == 'A')) {
			possible = false;
		} else if (s.substring(2, s.length() - 1).indexOf("C") == -1) {
			possible = false;
		} else {
			String tmpS =  s.substring(1, s.substring(2, s.length() - 1).indexOf("C") + 2) + s.substring(s.substring(2, s.length() - 1).indexOf("C") + 3);
			if (!tmpS.toUpperCase().toLowerCase().equals(tmpS)) possible = false;
		}
		if (possible) {
			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();
		boolean possible = true;

		if (!(s.charAt(0) == 'A')) {
			possible = false;
		} else if (s.substring(2, s.length() - 1).indexOf("C") == -1) {
			possible = false;
		} else {
			String tmpS =  s.substring(1, s.substring(2, s.length() - 1).indexOf("C") + 2) + s.substring(s.substring(2, s.length() - 1).indexOf("C") + 3);
			if (!tmpS.toUpperCase().toLowerCase().equals(tmpS)) possible = false;
		}
		if (possible) {
			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();
		boolean possible = true;

		if (!(s.charAt(0) == 'A')) {
			possible = false;
		} else if (s.substring(2, s.length() - 1).indexOf("C") == -1) {
			possible = false;
		} else {
			String tmpS =  s.substring(1, s.substring(2, s.length() - 1).indexOf("C") + 2) + s.substring(s.substring(2, s.length() - 1).indexOf("C") + 3);
			if (!tmpS.toUpperCase().toLowerCase().equals(tmpS)) possible = false;
		}
		if (possible) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		boolean possible = true;

		if (!(s.charAt(0) == 'A')) {
			possible = false;
		} else if (s.substring(2, s.length() - 1).indexOf("C") == -1) {
			possible = false;
		} else {
			String tmpS =  s.substring(1, s.substring(2, s.length() - 1).indexOf("C") + 2) + s.substring(s.substring(2, s.length() - 1).indexOf("C") + 3);
			if (!tmpS.toUpperCase().toLowerCase().equals(tmpS)) possible = false;
		}
		if (possible) {
			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 boolean possible = true; possible true if (!(s.charAt(0) == 'A')) {
			possible = false;
		} else if (s.substring(2, s.length() - 1).indexOf("C") == -1) {
			possible = false;
		} else {
			String tmpS =  s.substring(1, s.substring(2, s.length() - 1).indexOf("C") + 2) + s.substring(s.substring(2, s.length() - 1).indexOf("C") + 3);
			if (!tmpS.toUpperCase().toLowerCase().equals(tmpS)) possible = false;
		} !(s.charAt(0) == 'A') (s.charAt(0) == 'A') s.charAt(0) s.charAt s 0 'A' {
			possible = false;
		} possible = false possible false if (s.substring(2, s.length() - 1).indexOf("C") == -1) {
			possible = false;
		} else {
			String tmpS =  s.substring(1, s.substring(2, s.length() - 1).indexOf("C") + 2) + s.substring(s.substring(2, s.length() - 1).indexOf("C") + 3);
			if (!tmpS.toUpperCase().toLowerCase().equals(tmpS)) possible = false;
		} s.substring(2, s.length() - 1).indexOf("C") == -1 s.substring(2, s.length() - 1).indexOf("C") s.substring(2, s.length() - 1).indexOf s.substring(2, s.length() - 1) s.substring s 2 s.length() - 1 s.length() s.length s 1 "C" -1 1 {
			possible = false;
		} possible = false possible false {
			String tmpS =  s.substring(1, s.substring(2, s.length() - 1).indexOf("C") + 2) + s.substring(s.substring(2, s.length() - 1).indexOf("C") + 3);
			if (!tmpS.toUpperCase().toLowerCase().equals(tmpS)) possible = false;
		} String tmpS =  s.substring(1, s.substring(2, s.length() - 1).indexOf("C") + 2) + s.substring(s.substring(2, s.length() - 1).indexOf("C") + 3); tmpS s.substring(1, s.substring(2, s.length() - 1).indexOf("C") + 2) + s.substring(s.substring(2, s.length() - 1).indexOf("C") + 3) s.substring(1, s.substring(2, s.length() - 1).indexOf("C") + 2) s.substring s 1 s.substring(2, s.length() - 1).indexOf("C") + 2 s.substring(2, s.length() - 1).indexOf("C") s.substring(2, s.length() - 1).indexOf s.substring(2, s.length() - 1) s.substring s 2 s.length() - 1 s.length() s.length s 1 "C" 2 s.substring(s.substring(2, s.length() - 1).indexOf("C") + 3) s.substring s s.substring(2, s.length() - 1).indexOf("C") + 3 s.substring(2, s.length() - 1).indexOf("C") s.substring(2, s.length() - 1).indexOf s.substring(2, s.length() - 1) s.substring s 2 s.length() - 1 s.length() s.length s 1 "C" 3 if (!tmpS.toUpperCase().toLowerCase().equals(tmpS)) possible = false; !tmpS.toUpperCase().toLowerCase().equals(tmpS) tmpS.toUpperCase().toLowerCase().equals(tmpS) tmpS.toUpperCase().toLowerCase().equals tmpS.toUpperCase().toLowerCase() tmpS.toUpperCase().toLowerCase tmpS.toUpperCase() tmpS.toUpperCase tmpS tmpS possible = false possible false if (possible) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		} possible {
			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();
		boolean possible = true;

		if (!(s.charAt(0) == 'A')) {
			possible = false;
		} else if (s.substring(2, s.length() - 1).indexOf("C") == -1) {
			possible = false;
		} else {
			String tmpS =  s.substring(1, s.substring(2, s.length() - 1).indexOf("C") + 2) + s.substring(s.substring(2, s.length() - 1).indexOf("C") + 3);
			if (!tmpS.toUpperCase().toLowerCase().equals(tmpS)) possible = false;
		}
		if (possible) {
			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();
		boolean possible = true;

		if (!(s.charAt(0) == 'A')) {
			possible = false;
		} else if (s.substring(2, s.length() - 1).indexOf("C") == -1) {
			possible = false;
		} else {
			String tmpS =  s.substring(1, s.substring(2, s.length() - 1).indexOf("C") + 2) + s.substring(s.substring(2, s.length() - 1).indexOf("C") + 3);
			if (!tmpS.toUpperCase().toLowerCase().equals(tmpS)) possible = false;
		}
		if (possible) {
			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();
		boolean possible = true;

		if (!(s.charAt(0) == 'A')) {
			possible = false;
		} else if (s.substring(2, s.length() - 1).indexOf("C") == -1) {
			possible = false;
		} else {
			String tmpS =  s.substring(1, s.substring(2, s.length() - 1).indexOf("C") + 2) + s.substring(s.substring(2, s.length() - 1).indexOf("C") + 3);
			if (!tmpS.toUpperCase().toLowerCase().equals(tmpS)) possible = false;
		}
		if (possible) {
			System.out.println("AC");
		} else {
			System.out.println("WA");
		}
	}
}
