import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;

public class Main{


	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		char[] num = scanner.nextLine().toCharArray();

		String flag = "AC";

		//#1
		if(num[0] != 'A')flag = "WA";

		//#2
		int cnt  = 0;
		for(int i = 2; i < num.length - 1; i++) {

			if(num[i] == 'C') {

				cnt++;
			}else if(Character.isUpperCase(num[i])) {

				flag = "WA";
				break;
			}
		}

		if(Character.isUpperCase(num[1]) || cnt != 1)flag = "WA";
		if(Character.isUpperCase(num[num.length - 1]))flag = "WA";

		System.out.println(flag);



	}
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.HashMap; HashMap java.util import java.util.HashSet; HashSet java.util import java.util.List; List java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main{


	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		char[] num = scanner.nextLine().toCharArray();

		String flag = "AC";

		//#1
		if(num[0] != 'A')flag = "WA";

		//#2
		int cnt  = 0;
		for(int i = 2; i < num.length - 1; i++) {

			if(num[i] == 'C') {

				cnt++;
			}else if(Character.isUpperCase(num[i])) {

				flag = "WA";
				break;
			}
		}

		if(Character.isUpperCase(num[1]) || cnt != 1)flag = "WA";
		if(Character.isUpperCase(num[num.length - 1]))flag = "WA";

		System.out.println(flag);



	}
} Main public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		char[] num = scanner.nextLine().toCharArray();

		String flag = "AC";

		//#1
		if(num[0] != 'A')flag = "WA";

		//#2
		int cnt  = 0;
		for(int i = 2; i < num.length - 1; i++) {

			if(num[i] == 'C') {

				cnt++;
			}else if(Character.isUpperCase(num[i])) {

				flag = "WA";
				break;
			}
		}

		if(Character.isUpperCase(num[1]) || cnt != 1)flag = "WA";
		if(Character.isUpperCase(num[num.length - 1]))flag = "WA";

		System.out.println(flag);



	} main {

		Scanner scanner = new Scanner(System.in);
		char[] num = scanner.nextLine().toCharArray();

		String flag = "AC";

		//#1
		if(num[0] != 'A')flag = "WA";

		//#2
		int cnt  = 0;
		for(int i = 2; i < num.length - 1; i++) {

			if(num[i] == 'C') {

				cnt++;
			}else if(Character.isUpperCase(num[i])) {

				flag = "WA";
				break;
			}
		}

		if(Character.isUpperCase(num[1]) || cnt != 1)flag = "WA";
		if(Character.isUpperCase(num[num.length - 1]))flag = "WA";

		System.out.println(flag);



	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) char[] num = scanner.nextLine().toCharArray(); num scanner.nextLine().toCharArray() scanner.nextLine().toCharArray scanner.nextLine() scanner.nextLine scanner String flag = "AC"; flag "AC" if(num[0] != 'A')flag = "WA"; num[0] != 'A' num[0] num 0 'A' flag = "WA" flag "WA" int cnt  = 0; cnt 0 for(int i = 2; i < num.length - 1; i++) {

			if(num[i] == 'C') {

				cnt++;
			}else if(Character.isUpperCase(num[i])) {

				flag = "WA";
				break;
			}
		} int i = 2; int i = 2; i 2 i < num.length - 1 i num.length - 1 num.length num num.length 1 i++ i++ i {

			if(num[i] == 'C') {

				cnt++;
			}else if(Character.isUpperCase(num[i])) {

				flag = "WA";
				break;
			}
		} {

			if(num[i] == 'C') {

				cnt++;
			}else if(Character.isUpperCase(num[i])) {

				flag = "WA";
				break;
			}
		} if(num[i] == 'C') {

				cnt++;
			}else if(Character.isUpperCase(num[i])) {

				flag = "WA";
				break;
			} num[i] == 'C' num[i] num i 'C' {

				cnt++;
			} cnt++ cnt if(Character.isUpperCase(num[i])) {

				flag = "WA";
				break;
			} Character.isUpperCase(num[i]) Character.isUpperCase Character num[i] num i {

				flag = "WA";
				break;
			} flag = "WA" flag "WA" break; if(Character.isUpperCase(num[1]) || cnt != 1)flag = "WA"; Character.isUpperCase(num[1]) || cnt != 1 Character.isUpperCase(num[1]) Character.isUpperCase Character num[1] num 1 cnt != 1 cnt 1 flag = "WA" flag "WA" if(Character.isUpperCase(num[num.length - 1]))flag = "WA"; Character.isUpperCase(num[num.length - 1]) Character.isUpperCase Character num[num.length - 1] num num.length - 1 num.length num num.length 1 flag = "WA" flag "WA" System.out.println(flag) System.out.println System.out System System.out flag String[] args args public class Main{


	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		char[] num = scanner.nextLine().toCharArray();

		String flag = "AC";

		//#1
		if(num[0] != 'A')flag = "WA";

		//#2
		int cnt  = 0;
		for(int i = 2; i < num.length - 1; i++) {

			if(num[i] == 'C') {

				cnt++;
			}else if(Character.isUpperCase(num[i])) {

				flag = "WA";
				break;
			}
		}

		if(Character.isUpperCase(num[1]) || cnt != 1)flag = "WA";
		if(Character.isUpperCase(num[num.length - 1]))flag = "WA";

		System.out.println(flag);



	}
} public class Main{


	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		char[] num = scanner.nextLine().toCharArray();

		String flag = "AC";

		//#1
		if(num[0] != 'A')flag = "WA";

		//#2
		int cnt  = 0;
		for(int i = 2; i < num.length - 1; i++) {

			if(num[i] == 'C') {

				cnt++;
			}else if(Character.isUpperCase(num[i])) {

				flag = "WA";
				break;
			}
		}

		if(Character.isUpperCase(num[1]) || cnt != 1)flag = "WA";
		if(Character.isUpperCase(num[num.length - 1]))flag = "WA";

		System.out.println(flag);



	}
} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;

public class Main{


	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		char[] num = scanner.nextLine().toCharArray();

		String flag = "AC";

		//#1
		if(num[0] != 'A')flag = "WA";

		//#2
		int cnt  = 0;
		for(int i = 2; i < num.length - 1; i++) {

			if(num[i] == 'C') {

				cnt++;
			}else if(Character.isUpperCase(num[i])) {

				flag = "WA";
				break;
			}
		}

		if(Character.isUpperCase(num[1]) || cnt != 1)flag = "WA";
		if(Character.isUpperCase(num[num.length - 1]))flag = "WA";

		System.out.println(flag);



	}
}
