import java.util.ArrayList;
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String toi = scanner.nextLine();
		int cflag = 0;
		int joken1 = 0;
		int joken2 = 0;
		int joken3 = 0;


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

			if(toi.charAt(0) == 'A') {
				joken1 = 1;
			}else {
				break;
			}

			if(2 <= i && i <= toi.length() - 2 && toi.charAt(i) == 'C' && joken2 == 0) {
				joken2++;
			}else if(0 < i  && Character.isUpperCase(toi.charAt(i))){
				joken3 ++;
				break;
			}
		}



		if(joken1 == 1 && joken2 == 1 && joken3 == 0) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String toi = scanner.nextLine();
		int cflag = 0;
		int joken1 = 0;
		int joken2 = 0;
		int joken3 = 0;


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

			if(toi.charAt(0) == 'A') {
				joken1 = 1;
			}else {
				break;
			}

			if(2 <= i && i <= toi.length() - 2 && toi.charAt(i) == 'C' && joken2 == 0) {
				joken2++;
			}else if(0 < i  && Character.isUpperCase(toi.charAt(i))){
				joken3 ++;
				break;
			}
		}



		if(joken1 == 1 && joken2 == 1 && joken3 == 0) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	}
} Main public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String toi = scanner.nextLine();
		int cflag = 0;
		int joken1 = 0;
		int joken2 = 0;
		int joken3 = 0;


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

			if(toi.charAt(0) == 'A') {
				joken1 = 1;
			}else {
				break;
			}

			if(2 <= i && i <= toi.length() - 2 && toi.charAt(i) == 'C' && joken2 == 0) {
				joken2++;
			}else if(0 < i  && Character.isUpperCase(toi.charAt(i))){
				joken3 ++;
				break;
			}
		}



		if(joken1 == 1 && joken2 == 1 && joken3 == 0) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	} main {

		Scanner scanner = new Scanner(System.in);

		String toi = scanner.nextLine();
		int cflag = 0;
		int joken1 = 0;
		int joken2 = 0;
		int joken3 = 0;


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

			if(toi.charAt(0) == 'A') {
				joken1 = 1;
			}else {
				break;
			}

			if(2 <= i && i <= toi.length() - 2 && toi.charAt(i) == 'C' && joken2 == 0) {
				joken2++;
			}else if(0 < i  && Character.isUpperCase(toi.charAt(i))){
				joken3 ++;
				break;
			}
		}



		if(joken1 == 1 && joken2 == 1 && joken3 == 0) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String toi = scanner.nextLine(); toi scanner.nextLine() scanner.nextLine scanner int cflag = 0; cflag 0 int joken1 = 0; joken1 0 int joken2 = 0; joken2 0 int joken3 = 0; joken3 0 for(int i = 0; i < toi.length(); i++) {

			if(toi.charAt(0) == 'A') {
				joken1 = 1;
			}else {
				break;
			}

			if(2 <= i && i <= toi.length() - 2 && toi.charAt(i) == 'C' && joken2 == 0) {
				joken2++;
			}else if(0 < i  && Character.isUpperCase(toi.charAt(i))){
				joken3 ++;
				break;
			}
		} int i = 0; int i = 0; i 0 i < toi.length() i toi.length() toi.length toi i++ i++ i {

			if(toi.charAt(0) == 'A') {
				joken1 = 1;
			}else {
				break;
			}

			if(2 <= i && i <= toi.length() - 2 && toi.charAt(i) == 'C' && joken2 == 0) {
				joken2++;
			}else if(0 < i  && Character.isUpperCase(toi.charAt(i))){
				joken3 ++;
				break;
			}
		} {

			if(toi.charAt(0) == 'A') {
				joken1 = 1;
			}else {
				break;
			}

			if(2 <= i && i <= toi.length() - 2 && toi.charAt(i) == 'C' && joken2 == 0) {
				joken2++;
			}else if(0 < i  && Character.isUpperCase(toi.charAt(i))){
				joken3 ++;
				break;
			}
		} if(toi.charAt(0) == 'A') {
				joken1 = 1;
			}else {
				break;
			} toi.charAt(0) == 'A' toi.charAt(0) toi.charAt toi 0 'A' {
				joken1 = 1;
			} joken1 = 1 joken1 1 {
				break;
			} break; if(2 <= i && i <= toi.length() - 2 && toi.charAt(i) == 'C' && joken2 == 0) {
				joken2++;
			}else if(0 < i  && Character.isUpperCase(toi.charAt(i))){
				joken3 ++;
				break;
			} 2 <= i && i <= toi.length() - 2 && toi.charAt(i) == 'C' && joken2 == 0 toi.charAt(i) == 'C' 2 <= i && i <= toi.length() - 2 && toi.charAt(i) == 'C' && joken2 == 0 2 <= i 2 i i <= toi.length() - 2 i toi.length() - 2 toi.length() toi.length toi 2 toi.charAt(i) == 'C' toi.charAt(i) toi.charAt toi i 'C' joken2 == 0 joken2 0 {
				joken2++;
			} joken2++ joken2 if(0 < i  && Character.isUpperCase(toi.charAt(i))){
				joken3 ++;
				break;
			} 0 < i  && Character.isUpperCase(toi.charAt(i)) 0 < i 0 i Character.isUpperCase(toi.charAt(i)) Character.isUpperCase Character toi.charAt(i) toi.charAt toi i {
				joken3 ++;
				break;
			} joken3 ++ joken3 break; if(joken1 == 1 && joken2 == 1 && joken3 == 0) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		} joken1 == 1 && joken2 == 1 && joken3 == 0 joken1 == 1 && joken2 == 1 && joken3 == 0 joken1 == 1 joken1 1 joken2 == 1 joken2 1 joken3 == 0 joken3 0 {
			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 scanner = new Scanner(System.in);

		String toi = scanner.nextLine();
		int cflag = 0;
		int joken1 = 0;
		int joken2 = 0;
		int joken3 = 0;


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

			if(toi.charAt(0) == 'A') {
				joken1 = 1;
			}else {
				break;
			}

			if(2 <= i && i <= toi.length() - 2 && toi.charAt(i) == 'C' && joken2 == 0) {
				joken2++;
			}else if(0 < i  && Character.isUpperCase(toi.charAt(i))){
				joken3 ++;
				break;
			}
		}



		if(joken1 == 1 && joken2 == 1 && joken3 == 0) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	}
} public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String toi = scanner.nextLine();
		int cflag = 0;
		int joken1 = 0;
		int joken2 = 0;
		int joken3 = 0;


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

			if(toi.charAt(0) == 'A') {
				joken1 = 1;
			}else {
				break;
			}

			if(2 <= i && i <= toi.length() - 2 && toi.charAt(i) == 'C' && joken2 == 0) {
				joken2++;
			}else if(0 < i  && Character.isUpperCase(toi.charAt(i))){
				joken3 ++;
				break;
			}
		}



		if(joken1 == 1 && joken2 == 1 && joken3 == 0) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	}
} Main
import java.util.ArrayList;
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);

		String toi = scanner.nextLine();
		int cflag = 0;
		int joken1 = 0;
		int joken2 = 0;
		int joken3 = 0;


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

			if(toi.charAt(0) == 'A') {
				joken1 = 1;
			}else {
				break;
			}

			if(2 <= i && i <= toi.length() - 2 && toi.charAt(i) == 'C' && joken2 == 0) {
				joken2++;
			}else if(0 < i  && Character.isUpperCase(toi.charAt(i))){
				joken3 ++;
				break;
			}
		}



		if(joken1 == 1 && joken2 == 1 && joken3 == 0) {
			System.out.println("AC");
		}else {
			System.out.println("WA");
		}
	}
}
