import java.util.Scanner;

public class Main{
    public static void main(String args[]){
        
        Scanner sc1 = new Scanner(System.in);
        String s1 = sc1.next();
        int count = 0;
        
        char words[] = new char[s1.length()];
        for(int i = 0; i < s1.length(); i++){
            words[i] = s1.charAt(i);
        }
        
        // check first A
        if(words[0] == 'A'){
            count++;
            words[0] = 'a';
        }
        
        // check C
        int cCount = 0;
        for(int i = 2; i < s1.length() - 1; i++){
            if(words[i] == 'C'){
                cCount++;
                words[i] = 'c';
            }
        }
        
        if(cCount == 1){
            count++;
        }
        
        // check small chalacter
        for(int i = 1; i < s1.length(); i++){
            if(Character.isUpperCase(words[i])){
                count--;
            }
        }
        
        if(count == 2){
            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 sc1 = new Scanner(System.in);
        String s1 = sc1.next();
        int count = 0;
        
        char words[] = new char[s1.length()];
        for(int i = 0; i < s1.length(); i++){
            words[i] = s1.charAt(i);
        }
        
        // check first A
        if(words[0] == 'A'){
            count++;
            words[0] = 'a';
        }
        
        // check C
        int cCount = 0;
        for(int i = 2; i < s1.length() - 1; i++){
            if(words[i] == 'C'){
                cCount++;
                words[i] = 'c';
            }
        }
        
        if(cCount == 1){
            count++;
        }
        
        // check small chalacter
        for(int i = 1; i < s1.length(); i++){
            if(Character.isUpperCase(words[i])){
                count--;
            }
        }
        
        if(count == 2){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    }
} Main public static void main(String args[]){
        
        Scanner sc1 = new Scanner(System.in);
        String s1 = sc1.next();
        int count = 0;
        
        char words[] = new char[s1.length()];
        for(int i = 0; i < s1.length(); i++){
            words[i] = s1.charAt(i);
        }
        
        // check first A
        if(words[0] == 'A'){
            count++;
            words[0] = 'a';
        }
        
        // check C
        int cCount = 0;
        for(int i = 2; i < s1.length() - 1; i++){
            if(words[i] == 'C'){
                cCount++;
                words[i] = 'c';
            }
        }
        
        if(cCount == 1){
            count++;
        }
        
        // check small chalacter
        for(int i = 1; i < s1.length(); i++){
            if(Character.isUpperCase(words[i])){
                count--;
            }
        }
        
        if(count == 2){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    } main {
        
        Scanner sc1 = new Scanner(System.in);
        String s1 = sc1.next();
        int count = 0;
        
        char words[] = new char[s1.length()];
        for(int i = 0; i < s1.length(); i++){
            words[i] = s1.charAt(i);
        }
        
        // check first A
        if(words[0] == 'A'){
            count++;
            words[0] = 'a';
        }
        
        // check C
        int cCount = 0;
        for(int i = 2; i < s1.length() - 1; i++){
            if(words[i] == 'C'){
                cCount++;
                words[i] = 'c';
            }
        }
        
        if(cCount == 1){
            count++;
        }
        
        // check small chalacter
        for(int i = 1; i < s1.length(); i++){
            if(Character.isUpperCase(words[i])){
                count--;
            }
        }
        
        if(count == 2){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    } Scanner sc1 = new Scanner(System.in); sc1 new Scanner(System.in) String s1 = sc1.next(); s1 sc1.next() sc1.next sc1 int count = 0; count 0 char words[] = new char[s1.length()]; words new char[s1.length()] s1.length() s1.length s1 for(int i = 0; i < s1.length(); i++){
            words[i] = s1.charAt(i);
        } int i = 0; int i = 0; i 0 i < s1.length() i s1.length() s1.length s1 i++ i++ i {
            words[i] = s1.charAt(i);
        } {
            words[i] = s1.charAt(i);
        } words[i] = s1.charAt(i) words[i] words i s1.charAt(i) s1.charAt s1 i if(words[0] == 'A'){
            count++;
            words[0] = 'a';
        } words[0] == 'A' words[0] words 0 'A' {
            count++;
            words[0] = 'a';
        } count++ count words[0] = 'a' words[0] words 0 'a' int cCount = 0; cCount 0 for(int i = 2; i < s1.length() - 1; i++){
            if(words[i] == 'C'){
                cCount++;
                words[i] = 'c';
            }
        } int i = 2; int i = 2; i 2 i < s1.length() - 1 i s1.length() - 1 s1.length() s1.length s1 1 i++ i++ i {
            if(words[i] == 'C'){
                cCount++;
                words[i] = 'c';
            }
        } {
            if(words[i] == 'C'){
                cCount++;
                words[i] = 'c';
            }
        } if(words[i] == 'C'){
                cCount++;
                words[i] = 'c';
            } words[i] == 'C' words[i] words i 'C' {
                cCount++;
                words[i] = 'c';
            } cCount++ cCount words[i] = 'c' words[i] words i 'c' if(cCount == 1){
            count++;
        } cCount == 1 cCount 1 {
            count++;
        } count++ count for(int i = 1; i < s1.length(); i++){
            if(Character.isUpperCase(words[i])){
                count--;
            }
        } int i = 1; int i = 1; i 1 i < s1.length() i s1.length() s1.length s1 i++ i++ i {
            if(Character.isUpperCase(words[i])){
                count--;
            }
        } {
            if(Character.isUpperCase(words[i])){
                count--;
            }
        } if(Character.isUpperCase(words[i])){
                count--;
            } Character.isUpperCase(words[i]) Character.isUpperCase Character words[i] words i {
                count--;
            } count-- count if(count == 2){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        } count == 2 count 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[]){
        
        Scanner sc1 = new Scanner(System.in);
        String s1 = sc1.next();
        int count = 0;
        
        char words[] = new char[s1.length()];
        for(int i = 0; i < s1.length(); i++){
            words[i] = s1.charAt(i);
        }
        
        // check first A
        if(words[0] == 'A'){
            count++;
            words[0] = 'a';
        }
        
        // check C
        int cCount = 0;
        for(int i = 2; i < s1.length() - 1; i++){
            if(words[i] == 'C'){
                cCount++;
                words[i] = 'c';
            }
        }
        
        if(cCount == 1){
            count++;
        }
        
        // check small chalacter
        for(int i = 1; i < s1.length(); i++){
            if(Character.isUpperCase(words[i])){
                count--;
            }
        }
        
        if(count == 2){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    }
} public class Main{
    public static void main(String args[]){
        
        Scanner sc1 = new Scanner(System.in);
        String s1 = sc1.next();
        int count = 0;
        
        char words[] = new char[s1.length()];
        for(int i = 0; i < s1.length(); i++){
            words[i] = s1.charAt(i);
        }
        
        // check first A
        if(words[0] == 'A'){
            count++;
            words[0] = 'a';
        }
        
        // check C
        int cCount = 0;
        for(int i = 2; i < s1.length() - 1; i++){
            if(words[i] == 'C'){
                cCount++;
                words[i] = 'c';
            }
        }
        
        if(cCount == 1){
            count++;
        }
        
        // check small chalacter
        for(int i = 1; i < s1.length(); i++){
            if(Character.isUpperCase(words[i])){
                count--;
            }
        }
        
        if(count == 2){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String args[]){
        
        Scanner sc1 = new Scanner(System.in);
        String s1 = sc1.next();
        int count = 0;
        
        char words[] = new char[s1.length()];
        for(int i = 0; i < s1.length(); i++){
            words[i] = s1.charAt(i);
        }
        
        // check first A
        if(words[0] == 'A'){
            count++;
            words[0] = 'a';
        }
        
        // check C
        int cCount = 0;
        for(int i = 2; i < s1.length() - 1; i++){
            if(words[i] == 'C'){
                cCount++;
                words[i] = 'c';
            }
        }
        
        if(cCount == 1){
            count++;
        }
        
        // check small chalacter
        for(int i = 1; i < s1.length(); i++){
            if(Character.isUpperCase(words[i])){
                count--;
            }
        }
        
        if(count == 2){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
        
    }
}
