import java.util.*;
public class Main {
	public static void main(String[] args){
      	//データ取り込み
		Scanner sc = new Scanner(System.in);
		//int N = sc.nextInt();
    	//int M = sc.nextInt();
      	String S = sc.next();
      	//int list[] = new int[N];
      	//for(int i=0;i<N;i++){
        //	list[i] = sc.nextInt();
        //}
      	//Arrays.sort(list);
      	boolean o1 = S.charAt(0) == 'A';
      	boolean o3 = true;
      	for(int i=1;i<S.length();i++){
        	if(S.charAt(i)!='C' && Character.isUpperCase(S.charAt(i))){
            	o3 = false;
              	break;
            }
        }
      	int cnt = 0;
      	boolean o2 = true;
      	if(S.charAt(0)=='C' ||S.charAt(1)=='C'||S.charAt(S.length()-1)=='C'){
        	o2 = false;
        }else{
      	for(int i=0;i<S.length();i++){
        	if(S.charAt(i) == 'C'){
            	cnt++;
            }
        }
        if(cnt!=1){
                  	o2 = false;
                	
                }
        }
      	if(o1 && o2 && o3){
        	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);
		//int N = sc.nextInt();
    	//int M = sc.nextInt();
      	String S = sc.next();
      	//int list[] = new int[N];
      	//for(int i=0;i<N;i++){
        //	list[i] = sc.nextInt();
        //}
      	//Arrays.sort(list);
      	boolean o1 = S.charAt(0) == 'A';
      	boolean o3 = true;
      	for(int i=1;i<S.length();i++){
        	if(S.charAt(i)!='C' && Character.isUpperCase(S.charAt(i))){
            	o3 = false;
              	break;
            }
        }
      	int cnt = 0;
      	boolean o2 = true;
      	if(S.charAt(0)=='C' ||S.charAt(1)=='C'||S.charAt(S.length()-1)=='C'){
        	o2 = false;
        }else{
      	for(int i=0;i<S.length();i++){
        	if(S.charAt(i) == 'C'){
            	cnt++;
            }
        }
        if(cnt!=1){
                  	o2 = false;
                	
                }
        }
      	if(o1 && o2 && o3){
        	System.out.println("AC");
        }else{
        	System.out.println("WA");
        }
    }
} Main public static void main(String[] args){
      	//データ取り込み
		Scanner sc = new Scanner(System.in);
		//int N = sc.nextInt();
    	//int M = sc.nextInt();
      	String S = sc.next();
      	//int list[] = new int[N];
      	//for(int i=0;i<N;i++){
        //	list[i] = sc.nextInt();
        //}
      	//Arrays.sort(list);
      	boolean o1 = S.charAt(0) == 'A';
      	boolean o3 = true;
      	for(int i=1;i<S.length();i++){
        	if(S.charAt(i)!='C' && Character.isUpperCase(S.charAt(i))){
            	o3 = false;
              	break;
            }
        }
      	int cnt = 0;
      	boolean o2 = true;
      	if(S.charAt(0)=='C' ||S.charAt(1)=='C'||S.charAt(S.length()-1)=='C'){
        	o2 = false;
        }else{
      	for(int i=0;i<S.length();i++){
        	if(S.charAt(i) == 'C'){
            	cnt++;
            }
        }
        if(cnt!=1){
                  	o2 = false;
                	
                }
        }
      	if(o1 && o2 && o3){
        	System.out.println("AC");
        }else{
        	System.out.println("WA");
        }
    } main {
      	//データ取り込み
		Scanner sc = new Scanner(System.in);
		//int N = sc.nextInt();
    	//int M = sc.nextInt();
      	String S = sc.next();
      	//int list[] = new int[N];
      	//for(int i=0;i<N;i++){
        //	list[i] = sc.nextInt();
        //}
      	//Arrays.sort(list);
      	boolean o1 = S.charAt(0) == 'A';
      	boolean o3 = true;
      	for(int i=1;i<S.length();i++){
        	if(S.charAt(i)!='C' && Character.isUpperCase(S.charAt(i))){
            	o3 = false;
              	break;
            }
        }
      	int cnt = 0;
      	boolean o2 = true;
      	if(S.charAt(0)=='C' ||S.charAt(1)=='C'||S.charAt(S.length()-1)=='C'){
        	o2 = false;
        }else{
      	for(int i=0;i<S.length();i++){
        	if(S.charAt(i) == 'C'){
            	cnt++;
            }
        }
        if(cnt!=1){
                  	o2 = false;
                	
                }
        }
      	if(o1 && o2 && o3){
        	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 boolean o1 = S.charAt(0) == 'A'; o1 S.charAt(0) == 'A' S.charAt(0) S.charAt S 0 'A' boolean o3 = true; o3 true for(int i=1;i<S.length();i++){
        	if(S.charAt(i)!='C' && Character.isUpperCase(S.charAt(i))){
            	o3 = false;
              	break;
            }
        } int i=1; int i=1; i 1 i<S.length() i S.length() S.length S i++ i++ i {
        	if(S.charAt(i)!='C' && Character.isUpperCase(S.charAt(i))){
            	o3 = false;
              	break;
            }
        } {
        	if(S.charAt(i)!='C' && Character.isUpperCase(S.charAt(i))){
            	o3 = false;
              	break;
            }
        } if(S.charAt(i)!='C' && Character.isUpperCase(S.charAt(i))){
            	o3 = false;
              	break;
            } S.charAt(i)!='C' && Character.isUpperCase(S.charAt(i)) S.charAt(i)!='C' S.charAt(i) S.charAt S i 'C' Character.isUpperCase(S.charAt(i)) Character.isUpperCase Character S.charAt(i) S.charAt S i {
            	o3 = false;
              	break;
            } o3 = false o3 false break; int cnt = 0; cnt 0 boolean o2 = true; o2 true if(S.charAt(0)=='C' ||S.charAt(1)=='C'||S.charAt(S.length()-1)=='C'){
        	o2 = false;
        }else{
      	for(int i=0;i<S.length();i++){
        	if(S.charAt(i) == 'C'){
            	cnt++;
            }
        }
        if(cnt!=1){
                  	o2 = false;
                	
                }
        } S.charAt(0)=='C' ||S.charAt(1)=='C'||S.charAt(S.length()-1)=='C' S.charAt(0)=='C' ||S.charAt(1)=='C'||S.charAt(S.length()-1)=='C' S.charAt(0)=='C' S.charAt(0) S.charAt S 0 'C' S.charAt(1)=='C' S.charAt(1) S.charAt S 1 'C' S.charAt(S.length()-1)=='C' S.charAt(S.length()-1) S.charAt S S.length()-1 S.length() S.length S 1 'C' {
        	o2 = false;
        } o2 = false o2 false {
      	for(int i=0;i<S.length();i++){
        	if(S.charAt(i) == 'C'){
            	cnt++;
            }
        }
        if(cnt!=1){
                  	o2 = false;
                	
                }
        } for(int i=0;i<S.length();i++){
        	if(S.charAt(i) == 'C'){
            	cnt++;
            }
        } int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
        	if(S.charAt(i) == 'C'){
            	cnt++;
            }
        } {
        	if(S.charAt(i) == 'C'){
            	cnt++;
            }
        } if(S.charAt(i) == 'C'){
            	cnt++;
            } S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' {
            	cnt++;
            } cnt++ cnt if(cnt!=1){
                  	o2 = false;
                	
                } cnt!=1 cnt 1 {
                  	o2 = false;
                	
                } o2 = false o2 false if(o1 && o2 && o3){
        	System.out.println("AC");
        }else{
        	System.out.println("WA");
        } o1 && o2 && o3 o1 && o2 && o3 o1 o2 o3 {
        	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);
		//int N = sc.nextInt();
    	//int M = sc.nextInt();
      	String S = sc.next();
      	//int list[] = new int[N];
      	//for(int i=0;i<N;i++){
        //	list[i] = sc.nextInt();
        //}
      	//Arrays.sort(list);
      	boolean o1 = S.charAt(0) == 'A';
      	boolean o3 = true;
      	for(int i=1;i<S.length();i++){
        	if(S.charAt(i)!='C' && Character.isUpperCase(S.charAt(i))){
            	o3 = false;
              	break;
            }
        }
      	int cnt = 0;
      	boolean o2 = true;
      	if(S.charAt(0)=='C' ||S.charAt(1)=='C'||S.charAt(S.length()-1)=='C'){
        	o2 = false;
        }else{
      	for(int i=0;i<S.length();i++){
        	if(S.charAt(i) == 'C'){
            	cnt++;
            }
        }
        if(cnt!=1){
                  	o2 = false;
                	
                }
        }
      	if(o1 && o2 && o3){
        	System.out.println("AC");
        }else{
        	System.out.println("WA");
        }
    }
} public class Main {
	public static void main(String[] args){
      	//データ取り込み
		Scanner sc = new Scanner(System.in);
		//int N = sc.nextInt();
    	//int M = sc.nextInt();
      	String S = sc.next();
      	//int list[] = new int[N];
      	//for(int i=0;i<N;i++){
        //	list[i] = sc.nextInt();
        //}
      	//Arrays.sort(list);
      	boolean o1 = S.charAt(0) == 'A';
      	boolean o3 = true;
      	for(int i=1;i<S.length();i++){
        	if(S.charAt(i)!='C' && Character.isUpperCase(S.charAt(i))){
            	o3 = false;
              	break;
            }
        }
      	int cnt = 0;
      	boolean o2 = true;
      	if(S.charAt(0)=='C' ||S.charAt(1)=='C'||S.charAt(S.length()-1)=='C'){
        	o2 = false;
        }else{
      	for(int i=0;i<S.length();i++){
        	if(S.charAt(i) == 'C'){
            	cnt++;
            }
        }
        if(cnt!=1){
                  	o2 = false;
                	
                }
        }
      	if(o1 && o2 && o3){
        	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);
		//int N = sc.nextInt();
    	//int M = sc.nextInt();
      	String S = sc.next();
      	//int list[] = new int[N];
      	//for(int i=0;i<N;i++){
        //	list[i] = sc.nextInt();
        //}
      	//Arrays.sort(list);
      	boolean o1 = S.charAt(0) == 'A';
      	boolean o3 = true;
      	for(int i=1;i<S.length();i++){
        	if(S.charAt(i)!='C' && Character.isUpperCase(S.charAt(i))){
            	o3 = false;
              	break;
            }
        }
      	int cnt = 0;
      	boolean o2 = true;
      	if(S.charAt(0)=='C' ||S.charAt(1)=='C'||S.charAt(S.length()-1)=='C'){
        	o2 = false;
        }else{
      	for(int i=0;i<S.length();i++){
        	if(S.charAt(i) == 'C'){
            	cnt++;
            }
        }
        if(cnt!=1){
                  	o2 = false;
                	
                }
        }
      	if(o1 && o2 && o3){
        	System.out.println("AC");
        }else{
        	System.out.println("WA");
        }
    }
}
