import java.util.*;
 
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String str[] = s.split("");
        boolean boo = true;
        if(!str[0].equals("A")) boo = false;
        int count = 0;
        int index = 0;
        for(int i=2; i<str.length-1; i++){
            if(str[i].equals("C")){
                count++;
                index = i;
            }
        }
        if(count != 1) boo = false;
        for(int i=1; i<str.length; i++){
            if(i == index) continue;
            if(Character.isUpperCase(s.charAt(i))){
                boo = false;
            }
        }
        if(boo) 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();
        String str[] = s.split("");
        boolean boo = true;
        if(!str[0].equals("A")) boo = false;
        int count = 0;
        int index = 0;
        for(int i=2; i<str.length-1; i++){
            if(str[i].equals("C")){
                count++;
                index = i;
            }
        }
        if(count != 1) boo = false;
        for(int i=1; i<str.length; i++){
            if(i == index) continue;
            if(Character.isUpperCase(s.charAt(i))){
                boo = false;
            }
        }
        if(boo) 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();
        String str[] = s.split("");
        boolean boo = true;
        if(!str[0].equals("A")) boo = false;
        int count = 0;
        int index = 0;
        for(int i=2; i<str.length-1; i++){
            if(str[i].equals("C")){
                count++;
                index = i;
            }
        }
        if(count != 1) boo = false;
        for(int i=1; i<str.length; i++){
            if(i == index) continue;
            if(Character.isUpperCase(s.charAt(i))){
                boo = false;
            }
        }
        if(boo) System.out.println("AC");
        else System.out.println("WA");
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String str[] = s.split("");
        boolean boo = true;
        if(!str[0].equals("A")) boo = false;
        int count = 0;
        int index = 0;
        for(int i=2; i<str.length-1; i++){
            if(str[i].equals("C")){
                count++;
                index = i;
            }
        }
        if(count != 1) boo = false;
        for(int i=1; i<str.length; i++){
            if(i == index) continue;
            if(Character.isUpperCase(s.charAt(i))){
                boo = false;
            }
        }
        if(boo) 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 String str[] = s.split(""); str s.split("") s.split s "" boolean boo = true; boo true if(!str[0].equals("A")) boo = false; !str[0].equals("A") str[0].equals("A") str[0].equals str[0] str 0 "A" boo = false boo false int count = 0; count 0 int index = 0; index 0 for(int i=2; i<str.length-1; i++){
            if(str[i].equals("C")){
                count++;
                index = i;
            }
        } int i=2; int i=2; i 2 i<str.length-1 i str.length-1 str.length str str.length 1 i++ i++ i {
            if(str[i].equals("C")){
                count++;
                index = i;
            }
        } {
            if(str[i].equals("C")){
                count++;
                index = i;
            }
        } if(str[i].equals("C")){
                count++;
                index = i;
            } str[i].equals("C") str[i].equals str[i] str i "C" {
                count++;
                index = i;
            } count++ count index = i index i if(count != 1) boo = false; count != 1 count 1 boo = false boo false for(int i=1; i<str.length; i++){
            if(i == index) continue;
            if(Character.isUpperCase(s.charAt(i))){
                boo = false;
            }
        } int i=1; int i=1; i 1 i<str.length i str.length str str.length i++ i++ i {
            if(i == index) continue;
            if(Character.isUpperCase(s.charAt(i))){
                boo = false;
            }
        } {
            if(i == index) continue;
            if(Character.isUpperCase(s.charAt(i))){
                boo = false;
            }
        } if(i == index) continue; i == index i index continue; if(Character.isUpperCase(s.charAt(i))){
                boo = false;
            } Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i {
                boo = false;
            } boo = false boo false if(boo) System.out.println("AC");
        else System.out.println("WA"); boo System.out.println("AC") System.out.println System.out System System.out "AC" 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();
        String str[] = s.split("");
        boolean boo = true;
        if(!str[0].equals("A")) boo = false;
        int count = 0;
        int index = 0;
        for(int i=2; i<str.length-1; i++){
            if(str[i].equals("C")){
                count++;
                index = i;
            }
        }
        if(count != 1) boo = false;
        for(int i=1; i<str.length; i++){
            if(i == index) continue;
            if(Character.isUpperCase(s.charAt(i))){
                boo = false;
            }
        }
        if(boo) 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();
        String str[] = s.split("");
        boolean boo = true;
        if(!str[0].equals("A")) boo = false;
        int count = 0;
        int index = 0;
        for(int i=2; i<str.length-1; i++){
            if(str[i].equals("C")){
                count++;
                index = i;
            }
        }
        if(count != 1) boo = false;
        for(int i=1; i<str.length; i++){
            if(i == index) continue;
            if(Character.isUpperCase(s.charAt(i))){
                boo = false;
            }
        }
        if(boo) 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();
        String str[] = s.split("");
        boolean boo = true;
        if(!str[0].equals("A")) boo = false;
        int count = 0;
        int index = 0;
        for(int i=2; i<str.length-1; i++){
            if(str[i].equals("C")){
                count++;
                index = i;
            }
        }
        if(count != 1) boo = false;
        for(int i=1; i<str.length; i++){
            if(i == index) continue;
            if(Character.isUpperCase(s.charAt(i))){
                boo = false;
            }
        }
        if(boo) System.out.println("AC");
        else System.out.println("WA");
    }
}