import java.io.*;
import java.util.*;

public class Main {
    public static void main(String arg[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        if(s.charAt(0)!='A'){
            System.out.println("WA");
        }else{
            String a1 = s.substring(2, s.length()-1);
//            String a2 = s.substring(s.length()-2,s.length()-1);
//            System.out.println(a1+" "+a2);
            int n1 = a1.length()-a1.replaceAll("C","").length();
//            int n2 = a2.length()-a2.replaceAll("C","").length();
            if(n1!=1){
                System.out.println("WA");
            }else{
                String sa = s.replaceAll("A","");
                String sb = sa.replaceAll("C","");
                String lwr = sb.toLowerCase();
                if(lwr.equals(sb)){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }
            }
        }
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String arg[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        if(s.charAt(0)!='A'){
            System.out.println("WA");
        }else{
            String a1 = s.substring(2, s.length()-1);
//            String a2 = s.substring(s.length()-2,s.length()-1);
//            System.out.println(a1+" "+a2);
            int n1 = a1.length()-a1.replaceAll("C","").length();
//            int n2 = a2.length()-a2.replaceAll("C","").length();
            if(n1!=1){
                System.out.println("WA");
            }else{
                String sa = s.replaceAll("A","");
                String sb = sa.replaceAll("C","");
                String lwr = sb.toLowerCase();
                if(lwr.equals(sb)){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }
            }
        }
    }
} Main public static void main(String arg[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        if(s.charAt(0)!='A'){
            System.out.println("WA");
        }else{
            String a1 = s.substring(2, s.length()-1);
//            String a2 = s.substring(s.length()-2,s.length()-1);
//            System.out.println(a1+" "+a2);
            int n1 = a1.length()-a1.replaceAll("C","").length();
//            int n2 = a2.length()-a2.replaceAll("C","").length();
            if(n1!=1){
                System.out.println("WA");
            }else{
                String sa = s.replaceAll("A","");
                String sb = sa.replaceAll("C","");
                String lwr = sb.toLowerCase();
                if(lwr.equals(sb)){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }
            }
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        if(s.charAt(0)!='A'){
            System.out.println("WA");
        }else{
            String a1 = s.substring(2, s.length()-1);
//            String a2 = s.substring(s.length()-2,s.length()-1);
//            System.out.println(a1+" "+a2);
            int n1 = a1.length()-a1.replaceAll("C","").length();
//            int n2 = a2.length()-a2.replaceAll("C","").length();
            if(n1!=1){
                System.out.println("WA");
            }else{
                String sa = s.replaceAll("A","");
                String sb = sa.replaceAll("C","");
                String lwr = sb.toLowerCase();
                if(lwr.equals(sb)){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }
            }
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String s = br.readLine(); s br.readLine() br.readLine br if(s.charAt(0)!='A'){
            System.out.println("WA");
        }else{
            String a1 = s.substring(2, s.length()-1);
//            String a2 = s.substring(s.length()-2,s.length()-1);
//            System.out.println(a1+" "+a2);
            int n1 = a1.length()-a1.replaceAll("C","").length();
//            int n2 = a2.length()-a2.replaceAll("C","").length();
            if(n1!=1){
                System.out.println("WA");
            }else{
                String sa = s.replaceAll("A","");
                String sb = sa.replaceAll("C","");
                String lwr = sb.toLowerCase();
                if(lwr.equals(sb)){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }
            }
        } s.charAt(0)!='A' s.charAt(0) s.charAt s 0 'A' {
            System.out.println("WA");
        } System.out.println("WA") System.out.println System.out System System.out "WA" {
            String a1 = s.substring(2, s.length()-1);
//            String a2 = s.substring(s.length()-2,s.length()-1);
//            System.out.println(a1+" "+a2);
            int n1 = a1.length()-a1.replaceAll("C","").length();
//            int n2 = a2.length()-a2.replaceAll("C","").length();
            if(n1!=1){
                System.out.println("WA");
            }else{
                String sa = s.replaceAll("A","");
                String sb = sa.replaceAll("C","");
                String lwr = sb.toLowerCase();
                if(lwr.equals(sb)){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }
            }
        } String a1 = s.substring(2, s.length()-1); a1 s.substring(2, s.length()-1) s.substring s 2 s.length()-1 s.length() s.length s 1 int n1 = a1.length()-a1.replaceAll("C","").length(); n1 a1.length()-a1.replaceAll("C","").length() a1.length() a1.length a1 a1.replaceAll("C","").length() a1.replaceAll("C","").length a1.replaceAll("C","") a1.replaceAll a1 "C" "" if(n1!=1){
                System.out.println("WA");
            }else{
                String sa = s.replaceAll("A","");
                String sb = sa.replaceAll("C","");
                String lwr = sb.toLowerCase();
                if(lwr.equals(sb)){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }
            } n1!=1 n1 1 {
                System.out.println("WA");
            } System.out.println("WA") System.out.println System.out System System.out "WA" {
                String sa = s.replaceAll("A","");
                String sb = sa.replaceAll("C","");
                String lwr = sb.toLowerCase();
                if(lwr.equals(sb)){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }
            } String sa = s.replaceAll("A",""); sa s.replaceAll("A","") s.replaceAll s "A" "" String sb = sa.replaceAll("C",""); sb sa.replaceAll("C","") sa.replaceAll sa "C" "" String lwr = sb.toLowerCase(); lwr sb.toLowerCase() sb.toLowerCase sb if(lwr.equals(sb)){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                } lwr.equals(sb) lwr.equals lwr sb {
                    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 arg[] arg public class Main {
    public static void main(String arg[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        if(s.charAt(0)!='A'){
            System.out.println("WA");
        }else{
            String a1 = s.substring(2, s.length()-1);
//            String a2 = s.substring(s.length()-2,s.length()-1);
//            System.out.println(a1+" "+a2);
            int n1 = a1.length()-a1.replaceAll("C","").length();
//            int n2 = a2.length()-a2.replaceAll("C","").length();
            if(n1!=1){
                System.out.println("WA");
            }else{
                String sa = s.replaceAll("A","");
                String sb = sa.replaceAll("C","");
                String lwr = sb.toLowerCase();
                if(lwr.equals(sb)){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }
            }
        }
    }
} public class Main {
    public static void main(String arg[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        if(s.charAt(0)!='A'){
            System.out.println("WA");
        }else{
            String a1 = s.substring(2, s.length()-1);
//            String a2 = s.substring(s.length()-2,s.length()-1);
//            System.out.println(a1+" "+a2);
            int n1 = a1.length()-a1.replaceAll("C","").length();
//            int n2 = a2.length()-a2.replaceAll("C","").length();
            if(n1!=1){
                System.out.println("WA");
            }else{
                String sa = s.replaceAll("A","");
                String sb = sa.replaceAll("C","");
                String lwr = sb.toLowerCase();
                if(lwr.equals(sb)){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }
            }
        }
    }
} Main
import java.io.*;
import java.util.*;

public class Main {
    public static void main(String arg[])throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        if(s.charAt(0)!='A'){
            System.out.println("WA");
        }else{
            String a1 = s.substring(2, s.length()-1);
//            String a2 = s.substring(s.length()-2,s.length()-1);
//            System.out.println(a1+" "+a2);
            int n1 = a1.length()-a1.replaceAll("C","").length();
//            int n2 = a2.length()-a2.replaceAll("C","").length();
            if(n1!=1){
                System.out.println("WA");
            }else{
                String sa = s.replaceAll("A","");
                String sb = sa.replaceAll("C","");
                String lwr = sb.toLowerCase();
                if(lwr.equals(sb)){
                    System.out.println("AC");
                }else{
                    System.out.println("WA");
                }
            }
        }
    }
}