import java.util.Scanner;

public class Main {

		public static void main(String[] args){
			
			Scanner sc = new Scanner(System.in);
			// 文字列の入力
			String str = sc.next();
			String[] strArray = str.split("");

			int end2 = strArray.length -2;
			if(strArray[0].equals("A")){
			}else{
			    System.out.println("WA");
	    	    return;
			}

			int check = 0;
			for (int i = 2; i <= end2; i++) {
				if(strArray[i].equals("C")){
				    check = i;
				}
			}
			if(check  == 0){
				System.out.println("WA");
    	    	return;
			}
			for (int i = 1; i < strArray.length; i++) {
				if((i != 0)&&(i != check)){
					String temp = strArray[i].toString().toLowerCase();
					if(strArray[i].equals(temp)){
					}else{
						System.out.println("WA");
		    	    	return;
					}
				}
			}
		    System.out.println("AC");
    	    return;
			

		}
} import java.util.Scanner; Scanner java.util public class Main {

		public static void main(String[] args){
			
			Scanner sc = new Scanner(System.in);
			// 文字列の入力
			String str = sc.next();
			String[] strArray = str.split("");

			int end2 = strArray.length -2;
			if(strArray[0].equals("A")){
			}else{
			    System.out.println("WA");
	    	    return;
			}

			int check = 0;
			for (int i = 2; i <= end2; i++) {
				if(strArray[i].equals("C")){
				    check = i;
				}
			}
			if(check  == 0){
				System.out.println("WA");
    	    	return;
			}
			for (int i = 1; i < strArray.length; i++) {
				if((i != 0)&&(i != check)){
					String temp = strArray[i].toString().toLowerCase();
					if(strArray[i].equals(temp)){
					}else{
						System.out.println("WA");
		    	    	return;
					}
				}
			}
		    System.out.println("AC");
    	    return;
			

		}
} Main public static void main(String[] args){
			
			Scanner sc = new Scanner(System.in);
			// 文字列の入力
			String str = sc.next();
			String[] strArray = str.split("");

			int end2 = strArray.length -2;
			if(strArray[0].equals("A")){
			}else{
			    System.out.println("WA");
	    	    return;
			}

			int check = 0;
			for (int i = 2; i <= end2; i++) {
				if(strArray[i].equals("C")){
				    check = i;
				}
			}
			if(check  == 0){
				System.out.println("WA");
    	    	return;
			}
			for (int i = 1; i < strArray.length; i++) {
				if((i != 0)&&(i != check)){
					String temp = strArray[i].toString().toLowerCase();
					if(strArray[i].equals(temp)){
					}else{
						System.out.println("WA");
		    	    	return;
					}
				}
			}
		    System.out.println("AC");
    	    return;
			

		} main {
			
			Scanner sc = new Scanner(System.in);
			// 文字列の入力
			String str = sc.next();
			String[] strArray = str.split("");

			int end2 = strArray.length -2;
			if(strArray[0].equals("A")){
			}else{
			    System.out.println("WA");
	    	    return;
			}

			int check = 0;
			for (int i = 2; i <= end2; i++) {
				if(strArray[i].equals("C")){
				    check = i;
				}
			}
			if(check  == 0){
				System.out.println("WA");
    	    	return;
			}
			for (int i = 1; i < strArray.length; i++) {
				if((i != 0)&&(i != check)){
					String temp = strArray[i].toString().toLowerCase();
					if(strArray[i].equals(temp)){
					}else{
						System.out.println("WA");
		    	    	return;
					}
				}
			}
		    System.out.println("AC");
    	    return;
			

		} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc String[] strArray = str.split(""); strArray str.split("") str.split str "" int end2 = strArray.length -2; end2 strArray.length -2 strArray.length strArray strArray.length 2 if(strArray[0].equals("A")){
			}else{
			    System.out.println("WA");
	    	    return;
			} strArray[0].equals("A") strArray[0].equals strArray[0] strArray 0 "A" {
			} {
			    System.out.println("WA");
	    	    return;
			} System.out.println("WA") System.out.println System.out System System.out "WA" return; int check = 0; check 0 for (int i = 2; i <= end2; i++) {
				if(strArray[i].equals("C")){
				    check = i;
				}
			} int i = 2; int i = 2; i 2 i <= end2 i end2 i++ i++ i {
				if(strArray[i].equals("C")){
				    check = i;
				}
			} {
				if(strArray[i].equals("C")){
				    check = i;
				}
			} if(strArray[i].equals("C")){
				    check = i;
				} strArray[i].equals("C") strArray[i].equals strArray[i] strArray i "C" {
				    check = i;
				} check = i check i if(check  == 0){
				System.out.println("WA");
    	    	return;
			} check  == 0 check 0 {
				System.out.println("WA");
    	    	return;
			} System.out.println("WA") System.out.println System.out System System.out "WA" return; for (int i = 1; i < strArray.length; i++) {
				if((i != 0)&&(i != check)){
					String temp = strArray[i].toString().toLowerCase();
					if(strArray[i].equals(temp)){
					}else{
						System.out.println("WA");
		    	    	return;
					}
				}
			} int i = 1; int i = 1; i 1 i < strArray.length i strArray.length strArray strArray.length i++ i++ i {
				if((i != 0)&&(i != check)){
					String temp = strArray[i].toString().toLowerCase();
					if(strArray[i].equals(temp)){
					}else{
						System.out.println("WA");
		    	    	return;
					}
				}
			} {
				if((i != 0)&&(i != check)){
					String temp = strArray[i].toString().toLowerCase();
					if(strArray[i].equals(temp)){
					}else{
						System.out.println("WA");
		    	    	return;
					}
				}
			} if((i != 0)&&(i != check)){
					String temp = strArray[i].toString().toLowerCase();
					if(strArray[i].equals(temp)){
					}else{
						System.out.println("WA");
		    	    	return;
					}
				} (i != 0)&&(i != check) (i != 0) i 0 (i != check) i check {
					String temp = strArray[i].toString().toLowerCase();
					if(strArray[i].equals(temp)){
					}else{
						System.out.println("WA");
		    	    	return;
					}
				} String temp = strArray[i].toString().toLowerCase(); temp strArray[i].toString().toLowerCase() strArray[i].toString().toLowerCase strArray[i].toString() strArray[i].toString strArray[i] strArray i if(strArray[i].equals(temp)){
					}else{
						System.out.println("WA");
		    	    	return;
					} strArray[i].equals(temp) strArray[i].equals strArray[i] strArray i temp {
					} {
						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" return; String[] args args public class Main {

		public static void main(String[] args){
			
			Scanner sc = new Scanner(System.in);
			// 文字列の入力
			String str = sc.next();
			String[] strArray = str.split("");

			int end2 = strArray.length -2;
			if(strArray[0].equals("A")){
			}else{
			    System.out.println("WA");
	    	    return;
			}

			int check = 0;
			for (int i = 2; i <= end2; i++) {
				if(strArray[i].equals("C")){
				    check = i;
				}
			}
			if(check  == 0){
				System.out.println("WA");
    	    	return;
			}
			for (int i = 1; i < strArray.length; i++) {
				if((i != 0)&&(i != check)){
					String temp = strArray[i].toString().toLowerCase();
					if(strArray[i].equals(temp)){
					}else{
						System.out.println("WA");
		    	    	return;
					}
				}
			}
		    System.out.println("AC");
    	    return;
			

		}
} public class Main {

		public static void main(String[] args){
			
			Scanner sc = new Scanner(System.in);
			// 文字列の入力
			String str = sc.next();
			String[] strArray = str.split("");

			int end2 = strArray.length -2;
			if(strArray[0].equals("A")){
			}else{
			    System.out.println("WA");
	    	    return;
			}

			int check = 0;
			for (int i = 2; i <= end2; i++) {
				if(strArray[i].equals("C")){
				    check = i;
				}
			}
			if(check  == 0){
				System.out.println("WA");
    	    	return;
			}
			for (int i = 1; i < strArray.length; i++) {
				if((i != 0)&&(i != check)){
					String temp = strArray[i].toString().toLowerCase();
					if(strArray[i].equals(temp)){
					}else{
						System.out.println("WA");
		    	    	return;
					}
				}
			}
		    System.out.println("AC");
    	    return;
			

		}
} Main
import java.util.Scanner;

public class Main {

		public static void main(String[] args){
			
			Scanner sc = new Scanner(System.in);
			// 文字列の入力
			String str = sc.next();
			String[] strArray = str.split("");

			int end2 = strArray.length -2;
			if(strArray[0].equals("A")){
			}else{
			    System.out.println("WA");
	    	    return;
			}

			int check = 0;
			for (int i = 2; i <= end2; i++) {
				if(strArray[i].equals("C")){
				    check = i;
				}
			}
			if(check  == 0){
				System.out.println("WA");
    	    	return;
			}
			for (int i = 1; i < strArray.length; i++) {
				if((i != 0)&&(i != check)){
					String temp = strArray[i].toString().toLowerCase();
					if(strArray[i].equals(temp)){
					}else{
						System.out.println("WA");
		    	    	return;
					}
				}
			}
		    System.out.println("AC");
    	    return;
			

		}
}
