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 lowerCase =0;
      	for (int i = 0; i < s.length(); i++) {
			if (Character.isLowerCase(s.charAt(i))) {
              lowerCase++;
            }
          }
      	for (int i = 2; i < s.length() - 1; i++){
          if(s.charAt(i) == 'C'){
            	count++;
      	}
        }
          if((s.charAt(0) == 'A') && (lowerCase == s.length()-2) && count==1){
          	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 lowerCase =0;
      	for (int i = 0; i < s.length(); i++) {
			if (Character.isLowerCase(s.charAt(i))) {
              lowerCase++;
            }
          }
      	for (int i = 2; i < s.length() - 1; i++){
          if(s.charAt(i) == 'C'){
            	count++;
      	}
        }
          if((s.charAt(0) == 'A') && (lowerCase == s.length()-2) && count==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 count =0;
      	int lowerCase =0;
      	for (int i = 0; i < s.length(); i++) {
			if (Character.isLowerCase(s.charAt(i))) {
              lowerCase++;
            }
          }
      	for (int i = 2; i < s.length() - 1; i++){
          if(s.charAt(i) == 'C'){
            	count++;
      	}
        }
          if((s.charAt(0) == 'A') && (lowerCase == s.length()-2) && count==1){
          	System.out.println("AC");
          }else{
            System.out.println("WA");
          }
    } main {
		Scanner sc = new Scanner(System.in);
      	//数値の入力
		String s = sc.next();
      	int count =0;
      	int lowerCase =0;
      	for (int i = 0; i < s.length(); i++) {
			if (Character.isLowerCase(s.charAt(i))) {
              lowerCase++;
            }
          }
      	for (int i = 2; i < s.length() - 1; i++){
          if(s.charAt(i) == 'C'){
            	count++;
      	}
        }
          if((s.charAt(0) == 'A') && (lowerCase == s.length()-2) && count==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 count =0; count 0 int lowerCase =0; lowerCase 0 for (int i = 0; i < s.length(); i++) {
			if (Character.isLowerCase(s.charAt(i))) {
              lowerCase++;
            }
          } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
			if (Character.isLowerCase(s.charAt(i))) {
              lowerCase++;
            }
          } {
			if (Character.isLowerCase(s.charAt(i))) {
              lowerCase++;
            }
          } if (Character.isLowerCase(s.charAt(i))) {
              lowerCase++;
            } Character.isLowerCase(s.charAt(i)) Character.isLowerCase Character s.charAt(i) s.charAt s i {
              lowerCase++;
            } lowerCase++ lowerCase for (int i = 2; i < s.length() - 1; i++){
          if(s.charAt(i) == 'C'){
            	count++;
      	}
        } 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++;
      	}
        } {
          if(s.charAt(i) == 'C'){
            	count++;
      	}
        } if(s.charAt(i) == 'C'){
            	count++;
      	} s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
            	count++;
      	} count++ count if((s.charAt(0) == 'A') && (lowerCase == s.length()-2) && count==1){
          	System.out.println("AC");
          }else{
            System.out.println("WA");
          } (s.charAt(0) == 'A') && (lowerCase == s.length()-2) && count==1 (s.charAt(0) == 'A') && (lowerCase == s.length()-2) && count==1 (s.charAt(0) == 'A') s.charAt(0) s.charAt s 0 'A' (lowerCase == s.length()-2) lowerCase s.length()-2 s.length() s.length s 2 count==1 count 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 count =0;
      	int lowerCase =0;
      	for (int i = 0; i < s.length(); i++) {
			if (Character.isLowerCase(s.charAt(i))) {
              lowerCase++;
            }
          }
      	for (int i = 2; i < s.length() - 1; i++){
          if(s.charAt(i) == 'C'){
            	count++;
      	}
        }
          if((s.charAt(0) == 'A') && (lowerCase == s.length()-2) && count==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 count =0;
      	int lowerCase =0;
      	for (int i = 0; i < s.length(); i++) {
			if (Character.isLowerCase(s.charAt(i))) {
              lowerCase++;
            }
          }
      	for (int i = 2; i < s.length() - 1; i++){
          if(s.charAt(i) == 'C'){
            	count++;
      	}
        }
          if((s.charAt(0) == 'A') && (lowerCase == s.length()-2) && count==1){
          	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 lowerCase =0;
      	for (int i = 0; i < s.length(); i++) {
			if (Character.isLowerCase(s.charAt(i))) {
              lowerCase++;
            }
          }
      	for (int i = 2; i < s.length() - 1; i++){
          if(s.charAt(i) == 'C'){
            	count++;
      	}
        }
          if((s.charAt(0) == 'A') && (lowerCase == s.length()-2) && count==1){
          	System.out.println("AC");
          }else{
            System.out.println("WA");
          }
    }
}