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.charAt(0) != 'A'){
			System.out.println("WA");
			return;
		}
		int cCnt = 0;
		int cIndex = 0;
		for (int i = 2; i < s.length() -1; i++){
			char c = s.charAt(i);
			if (c == 'C'){
				cCnt++;
				cIndex = i;
			}
		}
		if (cCnt != 1){
			System.out.println("WA");
			return;
		}
		for (int i = 1; i < s.length(); i++){
			if (i != cIndex){
				if (!Character.isLowerCase(s.charAt(i))){
					System.out.println("WA");
					return;
				}
			}
		}
		System.out.println("AC");
	}
} 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.charAt(0) != 'A'){
			System.out.println("WA");
			return;
		}
		int cCnt = 0;
		int cIndex = 0;
		for (int i = 2; i < s.length() -1; i++){
			char c = s.charAt(i);
			if (c == 'C'){
				cCnt++;
				cIndex = i;
			}
		}
		if (cCnt != 1){
			System.out.println("WA");
			return;
		}
		for (int i = 1; i < s.length(); i++){
			if (i != cIndex){
				if (!Character.isLowerCase(s.charAt(i))){
					System.out.println("WA");
					return;
				}
			}
		}
		System.out.println("AC");
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String s = sc.next();

		if (s.charAt(0) != 'A'){
			System.out.println("WA");
			return;
		}
		int cCnt = 0;
		int cIndex = 0;
		for (int i = 2; i < s.length() -1; i++){
			char c = s.charAt(i);
			if (c == 'C'){
				cCnt++;
				cIndex = i;
			}
		}
		if (cCnt != 1){
			System.out.println("WA");
			return;
		}
		for (int i = 1; i < s.length(); i++){
			if (i != cIndex){
				if (!Character.isLowerCase(s.charAt(i))){
					System.out.println("WA");
					return;
				}
			}
		}
		System.out.println("AC");
	} main {

		Scanner sc = new Scanner(System.in);

		String s = sc.next();

		if (s.charAt(0) != 'A'){
			System.out.println("WA");
			return;
		}
		int cCnt = 0;
		int cIndex = 0;
		for (int i = 2; i < s.length() -1; i++){
			char c = s.charAt(i);
			if (c == 'C'){
				cCnt++;
				cIndex = i;
			}
		}
		if (cCnt != 1){
			System.out.println("WA");
			return;
		}
		for (int i = 1; i < s.length(); i++){
			if (i != cIndex){
				if (!Character.isLowerCase(s.charAt(i))){
					System.out.println("WA");
					return;
				}
			}
		}
		System.out.println("AC");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc if (s.charAt(0) != 'A'){
			System.out.println("WA");
			return;
		} s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; int cCnt = 0; cCnt 0 int cIndex = 0; cIndex 0 for (int i = 2; i < s.length() -1; i++){
			char c = s.charAt(i);
			if (c == 'C'){
				cCnt++;
				cIndex = i;
			}
		} int i = 2; int i = 2; i 2 i < s.length() -1 i s.length() -1 s.length() s.length s 1 i++ i++ i {
			char c = s.charAt(i);
			if (c == 'C'){
				cCnt++;
				cIndex = i;
			}
		} {
			char c = s.charAt(i);
			if (c == 'C'){
				cCnt++;
				cIndex = i;
			}
		} char c = s.charAt(i); c s.charAt(i) s.charAt s i if (c == 'C'){
				cCnt++;
				cIndex = i;
			} c == 'C' c 'C' {
				cCnt++;
				cIndex = i;
			} cCnt++ cCnt cIndex = i cIndex i if (cCnt != 1){
			System.out.println("WA");
			return;
		} cCnt != 1 cCnt 1 {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; for (int i = 1; i < s.length(); i++){
			if (i != cIndex){
				if (!Character.isLowerCase(s.charAt(i))){
					System.out.println("WA");
					return;
				}
			}
		} int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
			if (i != cIndex){
				if (!Character.isLowerCase(s.charAt(i))){
					System.out.println("WA");
					return;
				}
			}
		} {
			if (i != cIndex){
				if (!Character.isLowerCase(s.charAt(i))){
					System.out.println("WA");
					return;
				}
			}
		} if (i != cIndex){
				if (!Character.isLowerCase(s.charAt(i))){
					System.out.println("WA");
					return;
				}
			} i != cIndex i cIndex {
				if (!Character.isLowerCase(s.charAt(i))){
					System.out.println("WA");
					return;
				}
			} if (!Character.isLowerCase(s.charAt(i))){
					System.out.println("WA");
					return;
				} !Character.isLowerCase(s.charAt(i)) Character.isLowerCase(s.charAt(i)) Character.isLowerCase Character s.charAt(i) s.charAt s i {
					System.out.println("WA");
					return;
				} System.out.println("WA") System.out.println System.out System System.out "WA" return; System.out.println("AC") System.out.println System.out System System.out "AC" String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String s = sc.next();

		if (s.charAt(0) != 'A'){
			System.out.println("WA");
			return;
		}
		int cCnt = 0;
		int cIndex = 0;
		for (int i = 2; i < s.length() -1; i++){
			char c = s.charAt(i);
			if (c == 'C'){
				cCnt++;
				cIndex = i;
			}
		}
		if (cCnt != 1){
			System.out.println("WA");
			return;
		}
		for (int i = 1; i < s.length(); i++){
			if (i != cIndex){
				if (!Character.isLowerCase(s.charAt(i))){
					System.out.println("WA");
					return;
				}
			}
		}
		System.out.println("AC");
	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String s = sc.next();

		if (s.charAt(0) != 'A'){
			System.out.println("WA");
			return;
		}
		int cCnt = 0;
		int cIndex = 0;
		for (int i = 2; i < s.length() -1; i++){
			char c = s.charAt(i);
			if (c == 'C'){
				cCnt++;
				cIndex = i;
			}
		}
		if (cCnt != 1){
			System.out.println("WA");
			return;
		}
		for (int i = 1; i < s.length(); i++){
			if (i != cIndex){
				if (!Character.isLowerCase(s.charAt(i))){
					System.out.println("WA");
					return;
				}
			}
		}
		System.out.println("AC");
	}
} 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.charAt(0) != 'A'){
			System.out.println("WA");
			return;
		}
		int cCnt = 0;
		int cIndex = 0;
		for (int i = 2; i < s.length() -1; i++){
			char c = s.charAt(i);
			if (c == 'C'){
				cCnt++;
				cIndex = i;
			}
		}
		if (cCnt != 1){
			System.out.println("WA");
			return;
		}
		for (int i = 1; i < s.length(); i++){
			if (i != cIndex){
				if (!Character.isLowerCase(s.charAt(i))){
					System.out.println("WA");
					return;
				}
			}
		}
		System.out.println("AC");
	}
}