import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;



public class Main {

	public static void main(String[] args) throws IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str = br.readLine();

		int len = str.length();

		if(str.charAt(0) != 'A'){
			System.out.println("WA");
			return;
		}

		if(str.charAt(1) == 'C'){
			System.out.println("WA");
			return;
		}

		int numOfc = 0;

		for(int i = 2; i < len - 1; i++){
			if(str.charAt(i) == 'C'){
				numOfc++;
			}
		}

		if(numOfc != 1){
//			System.out.println("numofc" + numOfc);
			System.out.println("WA");
			return;
		}

		int lower = 0;
		for(int i = 0; i < len; i++){
			if(Character.isLowerCase(str.charAt(i))){
				lower++;
			}
		}

		if(lower != len - 2){
//			System.out.println("lower "+lower);
			System.out.println("WA");
			return;
		}

		System.out.println("AC");
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str = br.readLine();

		int len = str.length();

		if(str.charAt(0) != 'A'){
			System.out.println("WA");
			return;
		}

		if(str.charAt(1) == 'C'){
			System.out.println("WA");
			return;
		}

		int numOfc = 0;

		for(int i = 2; i < len - 1; i++){
			if(str.charAt(i) == 'C'){
				numOfc++;
			}
		}

		if(numOfc != 1){
//			System.out.println("numofc" + numOfc);
			System.out.println("WA");
			return;
		}

		int lower = 0;
		for(int i = 0; i < len; i++){
			if(Character.isLowerCase(str.charAt(i))){
				lower++;
			}
		}

		if(lower != len - 2){
//			System.out.println("lower "+lower);
			System.out.println("WA");
			return;
		}

		System.out.println("AC");
	}

} Main public static void main(String[] args) throws IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str = br.readLine();

		int len = str.length();

		if(str.charAt(0) != 'A'){
			System.out.println("WA");
			return;
		}

		if(str.charAt(1) == 'C'){
			System.out.println("WA");
			return;
		}

		int numOfc = 0;

		for(int i = 2; i < len - 1; i++){
			if(str.charAt(i) == 'C'){
				numOfc++;
			}
		}

		if(numOfc != 1){
//			System.out.println("numofc" + numOfc);
			System.out.println("WA");
			return;
		}

		int lower = 0;
		for(int i = 0; i < len; i++){
			if(Character.isLowerCase(str.charAt(i))){
				lower++;
			}
		}

		if(lower != len - 2){
//			System.out.println("lower "+lower);
			System.out.println("WA");
			return;
		}

		System.out.println("AC");
	} main {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str = br.readLine();

		int len = str.length();

		if(str.charAt(0) != 'A'){
			System.out.println("WA");
			return;
		}

		if(str.charAt(1) == 'C'){
			System.out.println("WA");
			return;
		}

		int numOfc = 0;

		for(int i = 2; i < len - 1; i++){
			if(str.charAt(i) == 'C'){
				numOfc++;
			}
		}

		if(numOfc != 1){
//			System.out.println("numofc" + numOfc);
			System.out.println("WA");
			return;
		}

		int lower = 0;
		for(int i = 0; i < len; i++){
			if(Character.isLowerCase(str.charAt(i))){
				lower++;
			}
		}

		if(lower != len - 2){
//			System.out.println("lower "+lower);
			System.out.println("WA");
			return;
		}

		System.out.println("AC");
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str = br.readLine(); str br.readLine() br.readLine br int len = str.length(); len str.length() str.length str if(str.charAt(0) != 'A'){
			System.out.println("WA");
			return;
		} str.charAt(0) != 'A' str.charAt(0) str.charAt str 0 'A' {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; if(str.charAt(1) == 'C'){
			System.out.println("WA");
			return;
		} str.charAt(1) == 'C' str.charAt(1) str.charAt str 1 'C' {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; int numOfc = 0; numOfc 0 for(int i = 2; i < len - 1; i++){
			if(str.charAt(i) == 'C'){
				numOfc++;
			}
		} int i = 2; int i = 2; i 2 i < len - 1 i len - 1 len 1 i++ i++ i {
			if(str.charAt(i) == 'C'){
				numOfc++;
			}
		} {
			if(str.charAt(i) == 'C'){
				numOfc++;
			}
		} if(str.charAt(i) == 'C'){
				numOfc++;
			} str.charAt(i) == 'C' str.charAt(i) str.charAt str i 'C' {
				numOfc++;
			} numOfc++ numOfc if(numOfc != 1){
//			System.out.println("numofc" + numOfc);
			System.out.println("WA");
			return;
		} numOfc != 1 numOfc 1 {
//			System.out.println("numofc" + numOfc);
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; int lower = 0; lower 0 for(int i = 0; i < len; i++){
			if(Character.isLowerCase(str.charAt(i))){
				lower++;
			}
		} int i = 0; int i = 0; i 0 i < len i len i++ i++ i {
			if(Character.isLowerCase(str.charAt(i))){
				lower++;
			}
		} {
			if(Character.isLowerCase(str.charAt(i))){
				lower++;
			}
		} if(Character.isLowerCase(str.charAt(i))){
				lower++;
			} Character.isLowerCase(str.charAt(i)) Character.isLowerCase Character str.charAt(i) str.charAt str i {
				lower++;
			} lower++ lower if(lower != len - 2){
//			System.out.println("lower "+lower);
			System.out.println("WA");
			return;
		} lower != len - 2 lower len - 2 len 2 {
//			System.out.println("lower "+lower);
			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) throws IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str = br.readLine();

		int len = str.length();

		if(str.charAt(0) != 'A'){
			System.out.println("WA");
			return;
		}

		if(str.charAt(1) == 'C'){
			System.out.println("WA");
			return;
		}

		int numOfc = 0;

		for(int i = 2; i < len - 1; i++){
			if(str.charAt(i) == 'C'){
				numOfc++;
			}
		}

		if(numOfc != 1){
//			System.out.println("numofc" + numOfc);
			System.out.println("WA");
			return;
		}

		int lower = 0;
		for(int i = 0; i < len; i++){
			if(Character.isLowerCase(str.charAt(i))){
				lower++;
			}
		}

		if(lower != len - 2){
//			System.out.println("lower "+lower);
			System.out.println("WA");
			return;
		}

		System.out.println("AC");
	}

} public class Main {

	public static void main(String[] args) throws IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str = br.readLine();

		int len = str.length();

		if(str.charAt(0) != 'A'){
			System.out.println("WA");
			return;
		}

		if(str.charAt(1) == 'C'){
			System.out.println("WA");
			return;
		}

		int numOfc = 0;

		for(int i = 2; i < len - 1; i++){
			if(str.charAt(i) == 'C'){
				numOfc++;
			}
		}

		if(numOfc != 1){
//			System.out.println("numofc" + numOfc);
			System.out.println("WA");
			return;
		}

		int lower = 0;
		for(int i = 0; i < len; i++){
			if(Character.isLowerCase(str.charAt(i))){
				lower++;
			}
		}

		if(lower != len - 2){
//			System.out.println("lower "+lower);
			System.out.println("WA");
			return;
		}

		System.out.println("AC");
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;



public class Main {

	public static void main(String[] args) throws IOException {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str = br.readLine();

		int len = str.length();

		if(str.charAt(0) != 'A'){
			System.out.println("WA");
			return;
		}

		if(str.charAt(1) == 'C'){
			System.out.println("WA");
			return;
		}

		int numOfc = 0;

		for(int i = 2; i < len - 1; i++){
			if(str.charAt(i) == 'C'){
				numOfc++;
			}
		}

		if(numOfc != 1){
//			System.out.println("numofc" + numOfc);
			System.out.println("WA");
			return;
		}

		int lower = 0;
		for(int i = 0; i < len; i++){
			if(Character.isLowerCase(str.charAt(i))){
				lower++;
			}
		}

		if(lower != len - 2){
//			System.out.println("lower "+lower);
			System.out.println("WA");
			return;
		}

		System.out.println("AC");
	}

}