import java.util.*;
import java.math.BigInteger;

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

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        int countC = 0;
        int count = 0;
        
        if(str.charAt(0) == 'A' && !Character.isUpperCase(str.charAt(1))){
            //System.out.println("test");
            for(int i=2; i<str.length()-1; i++){
                if(str.charAt(i) == 'C'){
                    countC++;
                   //System.out.println("test1");
                }
                if(Character.isUpperCase(str.charAt(i))){
                    count++;
                    //System.out.println("test2");
                }
                if(countC > 1 || count >1){
                    //System.out.println("test3");
                    break;
                }
            }
        }else{
            
        }
        
        if(countC==1 && !Character.isUpperCase(str.charAt(str.length()-1))){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    }
}
