import java.util.*;
 
public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count = 0;
        int komoji = 0;
        if(!(Character.isUpperCase(s.charAt(1)))){
        	komoji++;
            if(!(Character.isUpperCase(s.charAt(s.length() - 1)))){
            	komoji++;
            }
        }
        for(int i = 2; i < s.length() - 1; i++){
        	if(s.charAt(i) == 'C'){
            	count++;
            }else if(!(Character.isUpperCase(s.charAt(i)))){
            	komoji++;
            }
        }
        if(s.charAt(0) == 'A' && count == 1 && komoji == s.length() - 2){
        	System.out.println("AC");
        }else{
        	System.out.println("WA");
        }
    }
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count = 0;
        int komoji = 0;
        if(!(Character.isUpperCase(s.charAt(1)))){
        	komoji++;
            if(!(Character.isUpperCase(s.charAt(s.length() - 1)))){
            	komoji++;
            }
        }
        for(int i = 2; i < s.length() - 1; i++){
        	if(s.charAt(i) == 'C'){
            	count++;
            }else if(!(Character.isUpperCase(s.charAt(i)))){
            	komoji++;
            }
        }
        if(s.charAt(0) == 'A' && count == 1 && komoji == s.length() - 2){
        	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 count = 0;
        int komoji = 0;
        if(!(Character.isUpperCase(s.charAt(1)))){
        	komoji++;
            if(!(Character.isUpperCase(s.charAt(s.length() - 1)))){
            	komoji++;
            }
        }
        for(int i = 2; i < s.length() - 1; i++){
        	if(s.charAt(i) == 'C'){
            	count++;
            }else if(!(Character.isUpperCase(s.charAt(i)))){
            	komoji++;
            }
        }
        if(s.charAt(0) == 'A' && count == 1 && komoji == s.length() - 2){
        	System.out.println("AC");
        }else{
        	System.out.println("WA");
        }
    } main {
    	Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count = 0;
        int komoji = 0;
        if(!(Character.isUpperCase(s.charAt(1)))){
        	komoji++;
            if(!(Character.isUpperCase(s.charAt(s.length() - 1)))){
            	komoji++;
            }
        }
        for(int i = 2; i < s.length() - 1; i++){
        	if(s.charAt(i) == 'C'){
            	count++;
            }else if(!(Character.isUpperCase(s.charAt(i)))){
            	komoji++;
            }
        }
        if(s.charAt(0) == 'A' && count == 1 && komoji == s.length() - 2){
        	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 count = 0; count 0 int komoji = 0; komoji 0 if(!(Character.isUpperCase(s.charAt(1)))){
        	komoji++;
            if(!(Character.isUpperCase(s.charAt(s.length() - 1)))){
            	komoji++;
            }
        } !(Character.isUpperCase(s.charAt(1))) (Character.isUpperCase(s.charAt(1))) Character.isUpperCase Character s.charAt(1) s.charAt s 1 {
        	komoji++;
            if(!(Character.isUpperCase(s.charAt(s.length() - 1)))){
            	komoji++;
            }
        } komoji++ komoji if(!(Character.isUpperCase(s.charAt(s.length() - 1)))){
            	komoji++;
            } !(Character.isUpperCase(s.charAt(s.length() - 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 {
            	komoji++;
            } komoji++ komoji for(int i = 2; i < s.length() - 1; i++){
        	if(s.charAt(i) == 'C'){
            	count++;
            }else if(!(Character.isUpperCase(s.charAt(i)))){
            	komoji++;
            }
        } int i = 2; int i = 2; i 2 i < s.length() - 1 i s.length() - 1 s.length() s.length s 1 i++ i++ i {
        	if(s.charAt(i) == 'C'){
            	count++;
            }else if(!(Character.isUpperCase(s.charAt(i)))){
            	komoji++;
            }
        } {
        	if(s.charAt(i) == 'C'){
            	count++;
            }else if(!(Character.isUpperCase(s.charAt(i)))){
            	komoji++;
            }
        } if(s.charAt(i) == 'C'){
            	count++;
            }else if(!(Character.isUpperCase(s.charAt(i)))){
            	komoji++;
            } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
            	count++;
            } count++ count if(!(Character.isUpperCase(s.charAt(i)))){
            	komoji++;
            } !(Character.isUpperCase(s.charAt(i))) (Character.isUpperCase(s.charAt(i))) Character.isUpperCase Character s.charAt(i) s.charAt s i {
            	komoji++;
            } komoji++ komoji if(s.charAt(0) == 'A' && count == 1 && komoji == s.length() - 2){
        	System.out.println("AC");
        }else{
        	System.out.println("WA");
        } s.charAt(0) == 'A' && count == 1 && komoji == s.length() - 2 s.charAt(0) == 'A' && count == 1 && komoji == s.length() - 2 s.charAt(0) == 'A' s.charAt(0) s.charAt s 0 'A' count == 1 count 1 komoji == s.length() - 2 komoji s.length() - 2 s.length() s.length s 2 {
        	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 count = 0;
        int komoji = 0;
        if(!(Character.isUpperCase(s.charAt(1)))){
        	komoji++;
            if(!(Character.isUpperCase(s.charAt(s.length() - 1)))){
            	komoji++;
            }
        }
        for(int i = 2; i < s.length() - 1; i++){
        	if(s.charAt(i) == 'C'){
            	count++;
            }else if(!(Character.isUpperCase(s.charAt(i)))){
            	komoji++;
            }
        }
        if(s.charAt(0) == 'A' && count == 1 && komoji == s.length() - 2){
        	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 count = 0;
        int komoji = 0;
        if(!(Character.isUpperCase(s.charAt(1)))){
        	komoji++;
            if(!(Character.isUpperCase(s.charAt(s.length() - 1)))){
            	komoji++;
            }
        }
        for(int i = 2; i < s.length() - 1; i++){
        	if(s.charAt(i) == 'C'){
            	count++;
            }else if(!(Character.isUpperCase(s.charAt(i)))){
            	komoji++;
            }
        }
        if(s.charAt(0) == 'A' && count == 1 && komoji == s.length() - 2){
        	System.out.println("AC");
        }else{
        	System.out.println("WA");
        }
    }
} Main
import java.util.*;
 
public class Main{
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int count = 0;
        int komoji = 0;
        if(!(Character.isUpperCase(s.charAt(1)))){
        	komoji++;
            if(!(Character.isUpperCase(s.charAt(s.length() - 1)))){
            	komoji++;
            }
        }
        for(int i = 2; i < s.length() - 1; i++){
        	if(s.charAt(i) == 'C'){
            	count++;
            }else if(!(Character.isUpperCase(s.charAt(i)))){
            	komoji++;
            }
        }
        if(s.charAt(0) == 'A' && count == 1 && komoji == s.length() - 2){
        	System.out.println("AC");
        }else{
        	System.out.println("WA");
        }
    }
}