import java.util.Scanner;

public class Main {

	public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();

		boolean flag = true;

		int c=0;
		for(int i=0;i<S.length();i++) {

			if(i == 0) {
				if(S.charAt(0) != 'A') {
					flag = false;
					break;
				}
			}else if(i >= 2 && i < S.length() - 1) {
				if(S.charAt(i) == 'C') {
					c++;
				}else if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}else {
				if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}
		}

		if(c != 1) flag = false;

		if(flag) {
			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.nextLine();

		boolean flag = true;

		int c=0;
		for(int i=0;i<S.length();i++) {

			if(i == 0) {
				if(S.charAt(0) != 'A') {
					flag = false;
					break;
				}
			}else if(i >= 2 && i < S.length() - 1) {
				if(S.charAt(i) == 'C') {
					c++;
				}else if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}else {
				if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}
		}

		if(c != 1) flag = false;

		if(flag) {
			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.nextLine();

		boolean flag = true;

		int c=0;
		for(int i=0;i<S.length();i++) {

			if(i == 0) {
				if(S.charAt(0) != 'A') {
					flag = false;
					break;
				}
			}else if(i >= 2 && i < S.length() - 1) {
				if(S.charAt(i) == 'C') {
					c++;
				}else if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}else {
				if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}
		}

		if(c != 1) flag = false;

		if(flag) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	} main {

		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();

		boolean flag = true;

		int c=0;
		for(int i=0;i<S.length();i++) {

			if(i == 0) {
				if(S.charAt(0) != 'A') {
					flag = false;
					break;
				}
			}else if(i >= 2 && i < S.length() - 1) {
				if(S.charAt(i) == 'C') {
					c++;
				}else if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}else {
				if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}
		}

		if(c != 1) flag = false;

		if(flag) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.nextLine(); S sc.nextLine() sc.nextLine sc boolean flag = true; flag true int c=0; c 0 for(int i=0;i<S.length();i++) {

			if(i == 0) {
				if(S.charAt(0) != 'A') {
					flag = false;
					break;
				}
			}else if(i >= 2 && i < S.length() - 1) {
				if(S.charAt(i) == 'C') {
					c++;
				}else if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}else {
				if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}
		} int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {

			if(i == 0) {
				if(S.charAt(0) != 'A') {
					flag = false;
					break;
				}
			}else if(i >= 2 && i < S.length() - 1) {
				if(S.charAt(i) == 'C') {
					c++;
				}else if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}else {
				if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}
		} {

			if(i == 0) {
				if(S.charAt(0) != 'A') {
					flag = false;
					break;
				}
			}else if(i >= 2 && i < S.length() - 1) {
				if(S.charAt(i) == 'C') {
					c++;
				}else if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}else {
				if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}
		} if(i == 0) {
				if(S.charAt(0) != 'A') {
					flag = false;
					break;
				}
			}else if(i >= 2 && i < S.length() - 1) {
				if(S.charAt(i) == 'C') {
					c++;
				}else if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}else {
				if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			} i == 0 i 0 {
				if(S.charAt(0) != 'A') {
					flag = false;
					break;
				}
			} if(S.charAt(0) != 'A') {
					flag = false;
					break;
				} S.charAt(0) != 'A' S.charAt(0) S.charAt S 0 'A' {
					flag = false;
					break;
				} flag = false flag false break; if(i >= 2 && i < S.length() - 1) {
				if(S.charAt(i) == 'C') {
					c++;
				}else if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}else {
				if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			} i >= 2 && i < S.length() - 1 i >= 2 i 2 i < S.length() - 1 i S.length() - 1 S.length() S.length S 1 {
				if(S.charAt(i) == 'C') {
					c++;
				}else if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			} if(S.charAt(i) == 'C') {
					c++;
				}else if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				} S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' {
					c++;
				} c++ c if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				} Character.isUpperCase(S.charAt(i)) Character.isUpperCase Character S.charAt(i) S.charAt S i {
					flag = false;
					break;
				} flag = false flag false break; {
				if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			} if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				} Character.isUpperCase(S.charAt(i)) Character.isUpperCase Character S.charAt(i) S.charAt S i {
					flag = false;
					break;
				} flag = false flag false break; if(c != 1) flag = false; c != 1 c 1 flag = false flag false if(flag) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		} flag {
			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.nextLine();

		boolean flag = true;

		int c=0;
		for(int i=0;i<S.length();i++) {

			if(i == 0) {
				if(S.charAt(0) != 'A') {
					flag = false;
					break;
				}
			}else if(i >= 2 && i < S.length() - 1) {
				if(S.charAt(i) == 'C') {
					c++;
				}else if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}else {
				if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}
		}

		if(c != 1) flag = false;

		if(flag) {
			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.nextLine();

		boolean flag = true;

		int c=0;
		for(int i=0;i<S.length();i++) {

			if(i == 0) {
				if(S.charAt(0) != 'A') {
					flag = false;
					break;
				}
			}else if(i >= 2 && i < S.length() - 1) {
				if(S.charAt(i) == 'C') {
					c++;
				}else if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}else {
				if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}
		}

		if(c != 1) flag = false;

		if(flag) {
			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.nextLine();

		boolean flag = true;

		int c=0;
		for(int i=0;i<S.length();i++) {

			if(i == 0) {
				if(S.charAt(0) != 'A') {
					flag = false;
					break;
				}
			}else if(i >= 2 && i < S.length() - 1) {
				if(S.charAt(i) == 'C') {
					c++;
				}else if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}else {
				if(Character.isUpperCase(S.charAt(i))) {
					flag = false;
					break;
				}
			}
		}

		if(c != 1) flag = false;

		if(flag) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	}

}
