import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		
		// 입력
		String s = br.readLine();
		boolean firstA = false;
		boolean thirdC = false;
		boolean hasOtherCapital = false;
		int aCount = 0;
		int cCount = 0;
		
		if(s.length() >= 4 && s.length() <=10){
			for(int i = 0 ; i < s.length() ; i++){
				switch(s.charAt(i)){
				case 'A':
					aCount++;
					if(i == 0){
						firstA = true;
					}
					break;
				case 'C':
					cCount++;
					if(i > 1 && i < s.length()-1){
						thirdC = true;
					}
					break;
				default:
					if(s.charAt(i) > 65 && s.charAt(i) <= 90){
						hasOtherCapital = true;
					}
				}
			}
			
			if(firstA == true && thirdC == true && cCount == 1 && hasOtherCapital == false){
				bw.write("AC");
				bw.flush();
			}else{
				bw.write("WA");
				bw.flush();
			}
		}else{
			bw.write("WA");
			bw.flush();
		}
		
		bw.close();
		br.close();
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.BufferedWriter; BufferedWriter java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.OutputStreamWriter; OutputStreamWriter java.io import java.util.ArrayList; ArrayList java.util public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		
		// 입력
		String s = br.readLine();
		boolean firstA = false;
		boolean thirdC = false;
		boolean hasOtherCapital = false;
		int aCount = 0;
		int cCount = 0;
		
		if(s.length() >= 4 && s.length() <=10){
			for(int i = 0 ; i < s.length() ; i++){
				switch(s.charAt(i)){
				case 'A':
					aCount++;
					if(i == 0){
						firstA = true;
					}
					break;
				case 'C':
					cCount++;
					if(i > 1 && i < s.length()-1){
						thirdC = true;
					}
					break;
				default:
					if(s.charAt(i) > 65 && s.charAt(i) <= 90){
						hasOtherCapital = true;
					}
				}
			}
			
			if(firstA == true && thirdC == true && cCount == 1 && hasOtherCapital == false){
				bw.write("AC");
				bw.flush();
			}else{
				bw.write("WA");
				bw.flush();
			}
		}else{
			bw.write("WA");
			bw.flush();
		}
		
		bw.close();
		br.close();
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		
		// 입력
		String s = br.readLine();
		boolean firstA = false;
		boolean thirdC = false;
		boolean hasOtherCapital = false;
		int aCount = 0;
		int cCount = 0;
		
		if(s.length() >= 4 && s.length() <=10){
			for(int i = 0 ; i < s.length() ; i++){
				switch(s.charAt(i)){
				case 'A':
					aCount++;
					if(i == 0){
						firstA = true;
					}
					break;
				case 'C':
					cCount++;
					if(i > 1 && i < s.length()-1){
						thirdC = true;
					}
					break;
				default:
					if(s.charAt(i) > 65 && s.charAt(i) <= 90){
						hasOtherCapital = true;
					}
				}
			}
			
			if(firstA == true && thirdC == true && cCount == 1 && hasOtherCapital == false){
				bw.write("AC");
				bw.flush();
			}else{
				bw.write("WA");
				bw.flush();
			}
		}else{
			bw.write("WA");
			bw.flush();
		}
		
		bw.close();
		br.close();
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		
		// 입력
		String s = br.readLine();
		boolean firstA = false;
		boolean thirdC = false;
		boolean hasOtherCapital = false;
		int aCount = 0;
		int cCount = 0;
		
		if(s.length() >= 4 && s.length() <=10){
			for(int i = 0 ; i < s.length() ; i++){
				switch(s.charAt(i)){
				case 'A':
					aCount++;
					if(i == 0){
						firstA = true;
					}
					break;
				case 'C':
					cCount++;
					if(i > 1 && i < s.length()-1){
						thirdC = true;
					}
					break;
				default:
					if(s.charAt(i) > 65 && s.charAt(i) <= 90){
						hasOtherCapital = true;
					}
				}
			}
			
			if(firstA == true && thirdC == true && cCount == 1 && hasOtherCapital == false){
				bw.write("AC");
				bw.flush();
			}else{
				bw.write("WA");
				bw.flush();
			}
		}else{
			bw.write("WA");
			bw.flush();
		}
		
		bw.close();
		br.close();
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); bw new BufferedWriter(new OutputStreamWriter(System.out)) String s = br.readLine(); s br.readLine() br.readLine br boolean firstA = false; firstA false boolean thirdC = false; thirdC false boolean hasOtherCapital = false; hasOtherCapital false int aCount = 0; aCount 0 int cCount = 0; cCount 0 if(s.length() >= 4 && s.length() <=10){
			for(int i = 0 ; i < s.length() ; i++){
				switch(s.charAt(i)){
				case 'A':
					aCount++;
					if(i == 0){
						firstA = true;
					}
					break;
				case 'C':
					cCount++;
					if(i > 1 && i < s.length()-1){
						thirdC = true;
					}
					break;
				default:
					if(s.charAt(i) > 65 && s.charAt(i) <= 90){
						hasOtherCapital = true;
					}
				}
			}
			
			if(firstA == true && thirdC == true && cCount == 1 && hasOtherCapital == false){
				bw.write("AC");
				bw.flush();
			}else{
				bw.write("WA");
				bw.flush();
			}
		}else{
			bw.write("WA");
			bw.flush();
		} s.length() >= 4 && s.length() <=10 s.length() >= 4 s.length() s.length s 4 s.length() <=10 s.length() s.length s 10 {
			for(int i = 0 ; i < s.length() ; i++){
				switch(s.charAt(i)){
				case 'A':
					aCount++;
					if(i == 0){
						firstA = true;
					}
					break;
				case 'C':
					cCount++;
					if(i > 1 && i < s.length()-1){
						thirdC = true;
					}
					break;
				default:
					if(s.charAt(i) > 65 && s.charAt(i) <= 90){
						hasOtherCapital = true;
					}
				}
			}
			
			if(firstA == true && thirdC == true && cCount == 1 && hasOtherCapital == false){
				bw.write("AC");
				bw.flush();
			}else{
				bw.write("WA");
				bw.flush();
			}
		} for(int i = 0 ; i < s.length() ; i++){
				switch(s.charAt(i)){
				case 'A':
					aCount++;
					if(i == 0){
						firstA = true;
					}
					break;
				case 'C':
					cCount++;
					if(i > 1 && i < s.length()-1){
						thirdC = true;
					}
					break;
				default:
					if(s.charAt(i) > 65 && s.charAt(i) <= 90){
						hasOtherCapital = true;
					}
				}
			} int i = 0 ; int i = 0 ; i 0 i < s.length() i s.length() s.length s i++ i++ i {
				switch(s.charAt(i)){
				case 'A':
					aCount++;
					if(i == 0){
						firstA = true;
					}
					break;
				case 'C':
					cCount++;
					if(i > 1 && i < s.length()-1){
						thirdC = true;
					}
					break;
				default:
					if(s.charAt(i) > 65 && s.charAt(i) <= 90){
						hasOtherCapital = true;
					}
				}
			} {
				switch(s.charAt(i)){
				case 'A':
					aCount++;
					if(i == 0){
						firstA = true;
					}
					break;
				case 'C':
					cCount++;
					if(i > 1 && i < s.length()-1){
						thirdC = true;
					}
					break;
				default:
					if(s.charAt(i) > 65 && s.charAt(i) <= 90){
						hasOtherCapital = true;
					}
				}
			} switch(s.charAt(i)){
				case 'A':
					aCount++;
					if(i == 0){
						firstA = true;
					}
					break;
				case 'C':
					cCount++;
					if(i > 1 && i < s.length()-1){
						thirdC = true;
					}
					break;
				default:
					if(s.charAt(i) > 65 && s.charAt(i) <= 90){
						hasOtherCapital = true;
					}
				} s.charAt(i) s.charAt s i case 'A': 'A' case 'A': aCount++ aCount if(i == 0){
						firstA = true;
					} i == 0 i 0 {
						firstA = true;
					} firstA = true firstA true break; case 'C': 'C' case 'C': cCount++ cCount if(i > 1 && i < s.length()-1){
						thirdC = true;
					} i > 1 && i < s.length()-1 i > 1 i 1 i < s.length()-1 i s.length()-1 s.length() s.length s 1 {
						thirdC = true;
					} thirdC = true thirdC true break; default: default: if(s.charAt(i) > 65 && s.charAt(i) <= 90){
						hasOtherCapital = true;
					} s.charAt(i) > 65 && s.charAt(i) <= 90 s.charAt(i) > 65 s.charAt(i) s.charAt s i 65 s.charAt(i) <= 90 s.charAt(i) s.charAt s i 90 {
						hasOtherCapital = true;
					} hasOtherCapital = true hasOtherCapital true if(firstA == true && thirdC == true && cCount == 1 && hasOtherCapital == false){
				bw.write("AC");
				bw.flush();
			}else{
				bw.write("WA");
				bw.flush();
			} firstA == true && thirdC == true && cCount == 1 && hasOtherCapital == false cCount == 1 firstA == true && thirdC == true && cCount == 1 && hasOtherCapital == false firstA == true firstA true thirdC == true thirdC true cCount == 1 cCount 1 hasOtherCapital == false hasOtherCapital false {
				bw.write("AC");
				bw.flush();
			} bw.write("AC") bw.write bw "AC" bw.flush() bw.flush bw {
				bw.write("WA");
				bw.flush();
			} bw.write("WA") bw.write bw "WA" bw.flush() bw.flush bw {
			bw.write("WA");
			bw.flush();
		} bw.write("WA") bw.write bw "WA" bw.flush() bw.flush bw bw.close() bw.close bw br.close() br.close br String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		
		// 입력
		String s = br.readLine();
		boolean firstA = false;
		boolean thirdC = false;
		boolean hasOtherCapital = false;
		int aCount = 0;
		int cCount = 0;
		
		if(s.length() >= 4 && s.length() <=10){
			for(int i = 0 ; i < s.length() ; i++){
				switch(s.charAt(i)){
				case 'A':
					aCount++;
					if(i == 0){
						firstA = true;
					}
					break;
				case 'C':
					cCount++;
					if(i > 1 && i < s.length()-1){
						thirdC = true;
					}
					break;
				default:
					if(s.charAt(i) > 65 && s.charAt(i) <= 90){
						hasOtherCapital = true;
					}
				}
			}
			
			if(firstA == true && thirdC == true && cCount == 1 && hasOtherCapital == false){
				bw.write("AC");
				bw.flush();
			}else{
				bw.write("WA");
				bw.flush();
			}
		}else{
			bw.write("WA");
			bw.flush();
		}
		
		bw.close();
		br.close();
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		
		// 입력
		String s = br.readLine();
		boolean firstA = false;
		boolean thirdC = false;
		boolean hasOtherCapital = false;
		int aCount = 0;
		int cCount = 0;
		
		if(s.length() >= 4 && s.length() <=10){
			for(int i = 0 ; i < s.length() ; i++){
				switch(s.charAt(i)){
				case 'A':
					aCount++;
					if(i == 0){
						firstA = true;
					}
					break;
				case 'C':
					cCount++;
					if(i > 1 && i < s.length()-1){
						thirdC = true;
					}
					break;
				default:
					if(s.charAt(i) > 65 && s.charAt(i) <= 90){
						hasOtherCapital = true;
					}
				}
			}
			
			if(firstA == true && thirdC == true && cCount == 1 && hasOtherCapital == false){
				bw.write("AC");
				bw.flush();
			}else{
				bw.write("WA");
				bw.flush();
			}
		}else{
			bw.write("WA");
			bw.flush();
		}
		
		bw.close();
		br.close();
	}
} Main
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		
		// 입력
		String s = br.readLine();
		boolean firstA = false;
		boolean thirdC = false;
		boolean hasOtherCapital = false;
		int aCount = 0;
		int cCount = 0;
		
		if(s.length() >= 4 && s.length() <=10){
			for(int i = 0 ; i < s.length() ; i++){
				switch(s.charAt(i)){
				case 'A':
					aCount++;
					if(i == 0){
						firstA = true;
					}
					break;
				case 'C':
					cCount++;
					if(i > 1 && i < s.length()-1){
						thirdC = true;
					}
					break;
				default:
					if(s.charAt(i) > 65 && s.charAt(i) <= 90){
						hasOtherCapital = true;
					}
				}
			}
			
			if(firstA == true && thirdC == true && cCount == 1 && hasOtherCapital == false){
				bw.write("AC");
				bw.flush();
			}else{
				bw.write("WA");
				bw.flush();
			}
		}else{
			bw.write("WA");
			bw.flush();
		}
		
		bw.close();
		br.close();
	}
}