import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        
        String S = sc.nextLine();
        String[] SS = S.split("");
        
        int count = 0;
        int iw = 0;
        
        int count1 = 0;
        
            
        if(SS[0].equals("A")){
            
            for(int i=2; i<S.length()-1; i++){
                if(SS[i].equals("C")){
                   count++; 
                   iw = i;
                }
            }
            
        }
        
        
        for(int i=0; i<S.length(); i++){
            if(count == 1){
               if(Character.isUpperCase(S.charAt( i ))){
                   count1++;
               }
            }
        }
        
        if(count1 == 2){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    }
        
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        
        String S = sc.nextLine();
        String[] SS = S.split("");
        
        int count = 0;
        int iw = 0;
        
        int count1 = 0;
        
            
        if(SS[0].equals("A")){
            
            for(int i=2; i<S.length()-1; i++){
                if(SS[i].equals("C")){
                   count++; 
                   iw = i;
                }
            }
            
        }
        
        
        for(int i=0; i<S.length(); i++){
            if(count == 1){
               if(Character.isUpperCase(S.charAt( i ))){
                   count1++;
               }
            }
        }
        
        if(count1 == 2){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    }
        
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        
        String S = sc.nextLine();
        String[] SS = S.split("");
        
        int count = 0;
        int iw = 0;
        
        int count1 = 0;
        
            
        if(SS[0].equals("A")){
            
            for(int i=2; i<S.length()-1; i++){
                if(SS[i].equals("C")){
                   count++; 
                   iw = i;
                }
            }
            
        }
        
        
        for(int i=0; i<S.length(); i++){
            if(count == 1){
               if(Character.isUpperCase(S.charAt( i ))){
                   count1++;
               }
            }
        }
        
        if(count1 == 2){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        
        String S = sc.nextLine();
        String[] SS = S.split("");
        
        int count = 0;
        int iw = 0;
        
        int count1 = 0;
        
            
        if(SS[0].equals("A")){
            
            for(int i=2; i<S.length()-1; i++){
                if(SS[i].equals("C")){
                   count++; 
                   iw = i;
                }
            }
            
        }
        
        
        for(int i=0; i<S.length(); i++){
            if(count == 1){
               if(Character.isUpperCase(S.charAt( i ))){
                   count1++;
               }
            }
        }
        
        if(count1 == 2){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.nextLine(); S sc.nextLine() sc.nextLine sc String[] SS = S.split(""); SS S.split("") S.split S "" int count = 0; count 0 int iw = 0; iw 0 int count1 = 0; count1 0 if(SS[0].equals("A")){
            
            for(int i=2; i<S.length()-1; i++){
                if(SS[i].equals("C")){
                   count++; 
                   iw = i;
                }
            }
            
        } SS[0].equals("A") SS[0].equals SS[0] SS 0 "A" {
            
            for(int i=2; i<S.length()-1; i++){
                if(SS[i].equals("C")){
                   count++; 
                   iw = i;
                }
            }
            
        } for(int i=2; i<S.length()-1; i++){
                if(SS[i].equals("C")){
                   count++; 
                   iw = i;
                }
            } 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(SS[i].equals("C")){
                   count++; 
                   iw = i;
                }
            } {
                if(SS[i].equals("C")){
                   count++; 
                   iw = i;
                }
            } if(SS[i].equals("C")){
                   count++; 
                   iw = i;
                } SS[i].equals("C") SS[i].equals SS[i] SS i "C" {
                   count++; 
                   iw = i;
                } count++ count iw = i iw i for(int i=0; i<S.length(); i++){
            if(count == 1){
               if(Character.isUpperCase(S.charAt( i ))){
                   count1++;
               }
            }
        } int i=0; int i=0; i 0 i<S.length() i S.length() S.length S i++ i++ i {
            if(count == 1){
               if(Character.isUpperCase(S.charAt( i ))){
                   count1++;
               }
            }
        } {
            if(count == 1){
               if(Character.isUpperCase(S.charAt( i ))){
                   count1++;
               }
            }
        } if(count == 1){
               if(Character.isUpperCase(S.charAt( i ))){
                   count1++;
               }
            } count == 1 count 1 {
               if(Character.isUpperCase(S.charAt( i ))){
                   count1++;
               }
            } if(Character.isUpperCase(S.charAt( i ))){
                   count1++;
               } Character.isUpperCase(S.charAt( i )) Character.isUpperCase Character S.charAt( i ) S.charAt S i {
                   count1++;
               } count1++ count1 if(count1 == 2){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        } count1 == 2 count1 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) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        
        String S = sc.nextLine();
        String[] SS = S.split("");
        
        int count = 0;
        int iw = 0;
        
        int count1 = 0;
        
            
        if(SS[0].equals("A")){
            
            for(int i=2; i<S.length()-1; i++){
                if(SS[i].equals("C")){
                   count++; 
                   iw = i;
                }
            }
            
        }
        
        
        for(int i=0; i<S.length(); i++){
            if(count == 1){
               if(Character.isUpperCase(S.charAt( i ))){
                   count1++;
               }
            }
        }
        
        if(count1 == 2){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    }
        
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        
        String S = sc.nextLine();
        String[] SS = S.split("");
        
        int count = 0;
        int iw = 0;
        
        int count1 = 0;
        
            
        if(SS[0].equals("A")){
            
            for(int i=2; i<S.length()-1; i++){
                if(SS[i].equals("C")){
                   count++; 
                   iw = i;
                }
            }
            
        }
        
        
        for(int i=0; i<S.length(); i++){
            if(count == 1){
               if(Character.isUpperCase(S.charAt( i ))){
                   count1++;
               }
            }
        }
        
        if(count1 == 2){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    }
        
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        
        String S = sc.nextLine();
        String[] SS = S.split("");
        
        int count = 0;
        int iw = 0;
        
        int count1 = 0;
        
            
        if(SS[0].equals("A")){
            
            for(int i=2; i<S.length()-1; i++){
                if(SS[i].equals("C")){
                   count++; 
                   iw = i;
                }
            }
            
        }
        
        
        for(int i=0; i<S.length(); i++){
            if(count == 1){
               if(Character.isUpperCase(S.charAt( i ))){
                   count1++;
               }
            }
        }
        
        if(count1 == 2){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    }
        
}
