import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
        
        boolean ac = true;
        
        if(s.charAt(0) != 'A') ac = false;
        
        int c = 0;
        int index = 0;
        for(int i = 2; i <= s.length()-2; i++){
            if(s.charAt(i) == 'C'){
                c++;
                index = i;
            }
        }
        if(c != 1) ac = false;
        
        for(int i = 1; i < s.length(); i++){
            if(i == index) continue;
            if(!('a' <= s.charAt(i) && s.charAt(i) <= 'z')){
                ac = false;
            }
        }
        
        if(ac){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
        
        boolean ac = true;
        
        if(s.charAt(0) != 'A') ac = false;
        
        int c = 0;
        int index = 0;
        for(int i = 2; i <= s.length()-2; i++){
            if(s.charAt(i) == 'C'){
                c++;
                index = i;
            }
        }
        if(c != 1) ac = false;
        
        for(int i = 1; i < s.length(); i++){
            if(i == index) continue;
            if(!('a' <= s.charAt(i) && s.charAt(i) <= 'z')){
                ac = false;
            }
        }
        
        if(ac){
            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();
        
        boolean ac = true;
        
        if(s.charAt(0) != 'A') ac = false;
        
        int c = 0;
        int index = 0;
        for(int i = 2; i <= s.length()-2; i++){
            if(s.charAt(i) == 'C'){
                c++;
                index = i;
            }
        }
        if(c != 1) ac = false;
        
        for(int i = 1; i < s.length(); i++){
            if(i == index) continue;
            if(!('a' <= s.charAt(i) && s.charAt(i) <= 'z')){
                ac = false;
            }
        }
        
        if(ac){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    } main {
        
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
        
        boolean ac = true;
        
        if(s.charAt(0) != 'A') ac = false;
        
        int c = 0;
        int index = 0;
        for(int i = 2; i <= s.length()-2; i++){
            if(s.charAt(i) == 'C'){
                c++;
                index = i;
            }
        }
        if(c != 1) ac = false;
        
        for(int i = 1; i < s.length(); i++){
            if(i == index) continue;
            if(!('a' <= s.charAt(i) && s.charAt(i) <= 'z')){
                ac = false;
            }
        }
        
        if(ac){
            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 boolean ac = true; ac true if(s.charAt(0) != 'A') ac = false; s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' ac = false ac false int c = 0; c 0 int index = 0; index 0 for(int i = 2; i <= s.length()-2; i++){
            if(s.charAt(i) == 'C'){
                c++;
                index = i;
            }
        } int i = 2; int i = 2; i 2 i <= s.length()-2 i s.length()-2 s.length() s.length s 2 i++ i++ i {
            if(s.charAt(i) == 'C'){
                c++;
                index = i;
            }
        } {
            if(s.charAt(i) == 'C'){
                c++;
                index = i;
            }
        } if(s.charAt(i) == 'C'){
                c++;
                index = i;
            } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
                c++;
                index = i;
            } c++ c index = i index i if(c != 1) ac = false; c != 1 c 1 ac = false ac false for(int i = 1; i < s.length(); i++){
            if(i == index) continue;
            if(!('a' <= s.charAt(i) && s.charAt(i) <= 'z')){
                ac = false;
            }
        } int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
            if(i == index) continue;
            if(!('a' <= s.charAt(i) && s.charAt(i) <= 'z')){
                ac = false;
            }
        } {
            if(i == index) continue;
            if(!('a' <= s.charAt(i) && s.charAt(i) <= 'z')){
                ac = false;
            }
        } if(i == index) continue; i == index i index continue; if(!('a' <= s.charAt(i) && s.charAt(i) <= 'z')){
                ac = false;
            } !('a' <= s.charAt(i) && s.charAt(i) <= 'z') ('a' <= s.charAt(i) && s.charAt(i) <= 'z') 'a' <= s.charAt(i) 'a' s.charAt(i) s.charAt s i s.charAt(i) <= 'z' s.charAt(i) s.charAt s i 'z' {
                ac = false;
            } ac = false ac false if(ac){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        } ac {
            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();
        
        boolean ac = true;
        
        if(s.charAt(0) != 'A') ac = false;
        
        int c = 0;
        int index = 0;
        for(int i = 2; i <= s.length()-2; i++){
            if(s.charAt(i) == 'C'){
                c++;
                index = i;
            }
        }
        if(c != 1) ac = false;
        
        for(int i = 1; i < s.length(); i++){
            if(i == index) continue;
            if(!('a' <= s.charAt(i) && s.charAt(i) <= 'z')){
                ac = false;
            }
        }
        
        if(ac){
            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();
        
        boolean ac = true;
        
        if(s.charAt(0) != 'A') ac = false;
        
        int c = 0;
        int index = 0;
        for(int i = 2; i <= s.length()-2; i++){
            if(s.charAt(i) == 'C'){
                c++;
                index = i;
            }
        }
        if(c != 1) ac = false;
        
        for(int i = 1; i < s.length(); i++){
            if(i == index) continue;
            if(!('a' <= s.charAt(i) && s.charAt(i) <= 'z')){
                ac = false;
            }
        }
        
        if(ac){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        String s = sc.next();
        
        boolean ac = true;
        
        if(s.charAt(0) != 'A') ac = false;
        
        int c = 0;
        int index = 0;
        for(int i = 2; i <= s.length()-2; i++){
            if(s.charAt(i) == 'C'){
                c++;
                index = i;
            }
        }
        if(c != 1) ac = false;
        
        for(int i = 1; i < s.length(); i++){
            if(i == index) continue;
            if(!('a' <= s.charAt(i) && s.charAt(i) <= 'z')){
                ac = false;
            }
        }
        
        if(ac){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    }
}