import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String s = S.substring(2,S.length()-1);
        int count = 0;
        int memo = 0;
        boolean judge = false;

        if(S.charAt(0) == 'A'){
            for(int i = 0;i < s.length();i++){
                if(s.charAt(i) == 'C'){
                    count++;
                    memo = i+2;
                }
            }
            if(count == 1){
                for(int i = 1;i < S.length();i++){
                    if(i != memo){
                        if(Character.isUpperCase(S.charAt(i))){
                            judge = false;
                            break;
                        }else{
                            judge = true;
                        }
                    }
                    
                }
            }
        }
        if(judge == true){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String s = S.substring(2,S.length()-1);
        int count = 0;
        int memo = 0;
        boolean judge = false;

        if(S.charAt(0) == 'A'){
            for(int i = 0;i < s.length();i++){
                if(s.charAt(i) == 'C'){
                    count++;
                    memo = i+2;
                }
            }
            if(count == 1){
                for(int i = 1;i < S.length();i++){
                    if(i != memo){
                        if(Character.isUpperCase(S.charAt(i))){
                            judge = false;
                            break;
                        }else{
                            judge = true;
                        }
                    }
                    
                }
            }
        }
        if(judge == true){
            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 s = S.substring(2,S.length()-1);
        int count = 0;
        int memo = 0;
        boolean judge = false;

        if(S.charAt(0) == 'A'){
            for(int i = 0;i < s.length();i++){
                if(s.charAt(i) == 'C'){
                    count++;
                    memo = i+2;
                }
            }
            if(count == 1){
                for(int i = 1;i < S.length();i++){
                    if(i != memo){
                        if(Character.isUpperCase(S.charAt(i))){
                            judge = false;
                            break;
                        }else{
                            judge = true;
                        }
                    }
                    
                }
            }
        }
        if(judge == true){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String s = S.substring(2,S.length()-1);
        int count = 0;
        int memo = 0;
        boolean judge = false;

        if(S.charAt(0) == 'A'){
            for(int i = 0;i < s.length();i++){
                if(s.charAt(i) == 'C'){
                    count++;
                    memo = i+2;
                }
            }
            if(count == 1){
                for(int i = 1;i < S.length();i++){
                    if(i != memo){
                        if(Character.isUpperCase(S.charAt(i))){
                            judge = false;
                            break;
                        }else{
                            judge = true;
                        }
                    }
                    
                }
            }
        }
        if(judge == true){
            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 s = S.substring(2,S.length()-1); s S.substring(2,S.length()-1) S.substring S 2 S.length()-1 S.length() S.length S 1 int count = 0; count 0 int memo = 0; memo 0 boolean judge = false; judge false if(S.charAt(0) == 'A'){
            for(int i = 0;i < s.length();i++){
                if(s.charAt(i) == 'C'){
                    count++;
                    memo = i+2;
                }
            }
            if(count == 1){
                for(int i = 1;i < S.length();i++){
                    if(i != memo){
                        if(Character.isUpperCase(S.charAt(i))){
                            judge = false;
                            break;
                        }else{
                            judge = true;
                        }
                    }
                    
                }
            }
        } S.charAt(0) == 'A' S.charAt(0) S.charAt S 0 'A' {
            for(int i = 0;i < s.length();i++){
                if(s.charAt(i) == 'C'){
                    count++;
                    memo = i+2;
                }
            }
            if(count == 1){
                for(int i = 1;i < S.length();i++){
                    if(i != memo){
                        if(Character.isUpperCase(S.charAt(i))){
                            judge = false;
                            break;
                        }else{
                            judge = true;
                        }
                    }
                    
                }
            }
        } for(int i = 0;i < s.length();i++){
                if(s.charAt(i) == 'C'){
                    count++;
                    memo = i+2;
                }
            } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
                if(s.charAt(i) == 'C'){
                    count++;
                    memo = i+2;
                }
            } {
                if(s.charAt(i) == 'C'){
                    count++;
                    memo = i+2;
                }
            } if(s.charAt(i) == 'C'){
                    count++;
                    memo = i+2;
                } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
                    count++;
                    memo = i+2;
                } count++ count memo = i+2 memo i+2 i 2 if(count == 1){
                for(int i = 1;i < S.length();i++){
                    if(i != memo){
                        if(Character.isUpperCase(S.charAt(i))){
                            judge = false;
                            break;
                        }else{
                            judge = true;
                        }
                    }
                    
                }
            } count == 1 count 1 {
                for(int i = 1;i < S.length();i++){
                    if(i != memo){
                        if(Character.isUpperCase(S.charAt(i))){
                            judge = false;
                            break;
                        }else{
                            judge = true;
                        }
                    }
                    
                }
            } for(int i = 1;i < S.length();i++){
                    if(i != memo){
                        if(Character.isUpperCase(S.charAt(i))){
                            judge = false;
                            break;
                        }else{
                            judge = true;
                        }
                    }
                    
                } int i = 1; int i = 1; i 1 i < S.length() i S.length() S.length S i++ i++ i {
                    if(i != memo){
                        if(Character.isUpperCase(S.charAt(i))){
                            judge = false;
                            break;
                        }else{
                            judge = true;
                        }
                    }
                    
                } {
                    if(i != memo){
                        if(Character.isUpperCase(S.charAt(i))){
                            judge = false;
                            break;
                        }else{
                            judge = true;
                        }
                    }
                    
                } if(i != memo){
                        if(Character.isUpperCase(S.charAt(i))){
                            judge = false;
                            break;
                        }else{
                            judge = true;
                        }
                    } i != memo i memo {
                        if(Character.isUpperCase(S.charAt(i))){
                            judge = false;
                            break;
                        }else{
                            judge = true;
                        }
                    } if(Character.isUpperCase(S.charAt(i))){
                            judge = false;
                            break;
                        }else{
                            judge = true;
                        } Character.isUpperCase(S.charAt(i)) Character.isUpperCase Character S.charAt(i) S.charAt S i {
                            judge = false;
                            break;
                        } judge = false judge false break; {
                            judge = true;
                        } judge = true judge true if(judge == true){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        } judge == true judge true {
            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
import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        String s = S.substring(2,S.length()-1);
        int count = 0;
        int memo = 0;
        boolean judge = false;

        if(S.charAt(0) == 'A'){
            for(int i = 0;i < s.length();i++){
                if(s.charAt(i) == 'C'){
                    count++;
                    memo = i+2;
                }
            }
            if(count == 1){
                for(int i = 1;i < S.length();i++){
                    if(i != memo){
                        if(Character.isUpperCase(S.charAt(i))){
                            judge = false;
                            break;
                        }else{
                            judge = true;
                        }
                    }
                    
                }
            }
        }
        if(judge == true){
            System.out.println("AC");
        }else{
            System.out.println("WA");
        }
    }
}