import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int validCapLetterCount= 0;

		if (S.charAt(0) != 'A' || Character.isUpperCase(S.charAt(1))
				|| Character.isUpperCase(S.charAt(S.length() - 1))) {
			System.out.println("WA");
			return;
		}

		for (int i = 2; i <= S.length()-2; i++) {
			if(Character.isUpperCase(S.charAt(i)) && S.charAt(i)=='C' && validCapLetterCount==0){
               validCapLetterCount++;
			}else if(Character.isUpperCase(S.charAt(i))){
				System.out.println("WA");
				return;
			}
		}
		
		if(validCapLetterCount==1){
			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.next();
		int validCapLetterCount= 0;

		if (S.charAt(0) != 'A' || Character.isUpperCase(S.charAt(1))
				|| Character.isUpperCase(S.charAt(S.length() - 1))) {
			System.out.println("WA");
			return;
		}

		for (int i = 2; i <= S.length()-2; i++) {
			if(Character.isUpperCase(S.charAt(i)) && S.charAt(i)=='C' && validCapLetterCount==0){
               validCapLetterCount++;
			}else if(Character.isUpperCase(S.charAt(i))){
				System.out.println("WA");
				return;
			}
		}
		
		if(validCapLetterCount==1){
			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.next();
		int validCapLetterCount= 0;

		if (S.charAt(0) != 'A' || Character.isUpperCase(S.charAt(1))
				|| Character.isUpperCase(S.charAt(S.length() - 1))) {
			System.out.println("WA");
			return;
		}

		for (int i = 2; i <= S.length()-2; i++) {
			if(Character.isUpperCase(S.charAt(i)) && S.charAt(i)=='C' && validCapLetterCount==0){
               validCapLetterCount++;
			}else if(Character.isUpperCase(S.charAt(i))){
				System.out.println("WA");
				return;
			}
		}
		
		if(validCapLetterCount==1){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int validCapLetterCount= 0;

		if (S.charAt(0) != 'A' || Character.isUpperCase(S.charAt(1))
				|| Character.isUpperCase(S.charAt(S.length() - 1))) {
			System.out.println("WA");
			return;
		}

		for (int i = 2; i <= S.length()-2; i++) {
			if(Character.isUpperCase(S.charAt(i)) && S.charAt(i)=='C' && validCapLetterCount==0){
               validCapLetterCount++;
			}else if(Character.isUpperCase(S.charAt(i))){
				System.out.println("WA");
				return;
			}
		}
		
		if(validCapLetterCount==1){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int validCapLetterCount= 0; validCapLetterCount 0 if (S.charAt(0) != 'A' || Character.isUpperCase(S.charAt(1))
				|| Character.isUpperCase(S.charAt(S.length() - 1))) {
			System.out.println("WA");
			return;
		} S.charAt(0) != 'A' || Character.isUpperCase(S.charAt(1))
				|| Character.isUpperCase(S.charAt(S.length() - 1)) S.charAt(0) != 'A' || Character.isUpperCase(S.charAt(1))
				|| Character.isUpperCase(S.charAt(S.length() - 1)) S.charAt(0) != 'A' S.charAt(0) S.charAt S 0 'A' Character.isUpperCase(S.charAt(1)) Character.isUpperCase Character S.charAt(1) S.charAt S 1 Character.isUpperCase(S.charAt(S.length() - 1)) Character.isUpperCase Character S.charAt(S.length() - 1) S.charAt S S.length() - 1 S.length() S.length S 1 {
			System.out.println("WA");
			return;
		} System.out.println("WA") System.out.println System.out System System.out "WA" return; for (int i = 2; i <= S.length()-2; i++) {
			if(Character.isUpperCase(S.charAt(i)) && S.charAt(i)=='C' && validCapLetterCount==0){
               validCapLetterCount++;
			}else if(Character.isUpperCase(S.charAt(i))){
				System.out.println("WA");
				return;
			}
		} int i = 2; int i = 2; i 2 i <= S.length()-2 i S.length()-2 S.length() S.length S 2 i++ i++ i {
			if(Character.isUpperCase(S.charAt(i)) && S.charAt(i)=='C' && validCapLetterCount==0){
               validCapLetterCount++;
			}else if(Character.isUpperCase(S.charAt(i))){
				System.out.println("WA");
				return;
			}
		} {
			if(Character.isUpperCase(S.charAt(i)) && S.charAt(i)=='C' && validCapLetterCount==0){
               validCapLetterCount++;
			}else if(Character.isUpperCase(S.charAt(i))){
				System.out.println("WA");
				return;
			}
		} if(Character.isUpperCase(S.charAt(i)) && S.charAt(i)=='C' && validCapLetterCount==0){
               validCapLetterCount++;
			}else if(Character.isUpperCase(S.charAt(i))){
				System.out.println("WA");
				return;
			} Character.isUpperCase(S.charAt(i)) && S.charAt(i)=='C' && validCapLetterCount==0 Character.isUpperCase(S.charAt(i)) && S.charAt(i)=='C' && validCapLetterCount==0 Character.isUpperCase(S.charAt(i)) Character.isUpperCase Character S.charAt(i) S.charAt S i S.charAt(i)=='C' S.charAt(i) S.charAt S i 'C' validCapLetterCount==0 validCapLetterCount 0 {
               validCapLetterCount++;
			} validCapLetterCount++ validCapLetterCount if(Character.isUpperCase(S.charAt(i))){
				System.out.println("WA");
				return;
			} Character.isUpperCase(S.charAt(i)) Character.isUpperCase Character S.charAt(i) S.charAt S i {
				System.out.println("WA");
				return;
			} System.out.println("WA") System.out.println System.out System System.out "WA" return; if(validCapLetterCount==1){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		} validCapLetterCount==1 validCapLetterCount 1 {
			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.next();
		int validCapLetterCount= 0;

		if (S.charAt(0) != 'A' || Character.isUpperCase(S.charAt(1))
				|| Character.isUpperCase(S.charAt(S.length() - 1))) {
			System.out.println("WA");
			return;
		}

		for (int i = 2; i <= S.length()-2; i++) {
			if(Character.isUpperCase(S.charAt(i)) && S.charAt(i)=='C' && validCapLetterCount==0){
               validCapLetterCount++;
			}else if(Character.isUpperCase(S.charAt(i))){
				System.out.println("WA");
				return;
			}
		}
		
		if(validCapLetterCount==1){
			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.next();
		int validCapLetterCount= 0;

		if (S.charAt(0) != 'A' || Character.isUpperCase(S.charAt(1))
				|| Character.isUpperCase(S.charAt(S.length() - 1))) {
			System.out.println("WA");
			return;
		}

		for (int i = 2; i <= S.length()-2; i++) {
			if(Character.isUpperCase(S.charAt(i)) && S.charAt(i)=='C' && validCapLetterCount==0){
               validCapLetterCount++;
			}else if(Character.isUpperCase(S.charAt(i))){
				System.out.println("WA");
				return;
			}
		}
		
		if(validCapLetterCount==1){
			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.next();
		int validCapLetterCount= 0;

		if (S.charAt(0) != 'A' || Character.isUpperCase(S.charAt(1))
				|| Character.isUpperCase(S.charAt(S.length() - 1))) {
			System.out.println("WA");
			return;
		}

		for (int i = 2; i <= S.length()-2; i++) {
			if(Character.isUpperCase(S.charAt(i)) && S.charAt(i)=='C' && validCapLetterCount==0){
               validCapLetterCount++;
			}else if(Character.isUpperCase(S.charAt(i))){
				System.out.println("WA");
				return;
			}
		}
		
		if(validCapLetterCount==1){
			System.out.println("AC");
		}else{
			System.out.println("WA");
		}
	}
}