import java.util.*;

public class Main{

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);

        String S =sc.next();
        sc.close();

        int sum = 0;
        if(S.charAt(0) == 'A')
            sum++;
        int count = 0;
        for(int i = 2; i < S.length()-1; i++){
            if(S.charAt(i) == 'C'){
                count++;
            }
        }
        if(count == 1)
                sum++;
        int cnt = 0;
        for(int i = 1; i < S.length(); i++){
            if(S.charAt(i) - 'a' >= 0 && S.charAt(i) - 'a' <= 25){
                cnt++;
            }
        }
        if(cnt==S.length()-2)
                sum++;
        if(sum == 3)
            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();
        sc.close();

        int sum = 0;
        if(S.charAt(0) == 'A')
            sum++;
        int count = 0;
        for(int i = 2; i < S.length()-1; i++){
            if(S.charAt(i) == 'C'){
                count++;
            }
        }
        if(count == 1)
                sum++;
        int cnt = 0;
        for(int i = 1; i < S.length(); i++){
            if(S.charAt(i) - 'a' >= 0 && S.charAt(i) - 'a' <= 25){
                cnt++;
            }
        }
        if(cnt==S.length()-2)
                sum++;
        if(sum == 3)
            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();
        sc.close();

        int sum = 0;
        if(S.charAt(0) == 'A')
            sum++;
        int count = 0;
        for(int i = 2; i < S.length()-1; i++){
            if(S.charAt(i) == 'C'){
                count++;
            }
        }
        if(count == 1)
                sum++;
        int cnt = 0;
        for(int i = 1; i < S.length(); i++){
            if(S.charAt(i) - 'a' >= 0 && S.charAt(i) - 'a' <= 25){
                cnt++;
            }
        }
        if(cnt==S.length()-2)
                sum++;
        if(sum == 3)
            System.out.println("AC");
        else
            System.out.println("WA");
        
    } main {
        Scanner sc = new Scanner(System.in);

        String S =sc.next();
        sc.close();

        int sum = 0;
        if(S.charAt(0) == 'A')
            sum++;
        int count = 0;
        for(int i = 2; i < S.length()-1; i++){
            if(S.charAt(i) == 'C'){
                count++;
            }
        }
        if(count == 1)
                sum++;
        int cnt = 0;
        for(int i = 1; i < S.length(); i++){
            if(S.charAt(i) - 'a' >= 0 && S.charAt(i) - 'a' <= 25){
                cnt++;
            }
        }
        if(cnt==S.length()-2)
                sum++;
        if(sum == 3)
            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 sc.close() sc.close sc int sum = 0; sum 0 if(S.charAt(0) == 'A')
            sum++; S.charAt(0) == 'A' S.charAt(0) S.charAt S 0 'A' sum++ sum int count = 0; count 0 for(int i = 2; i < S.length()-1; i++){
            if(S.charAt(i) == 'C'){
                count++;
            }
        } int i = 2; int i = 2; i 2 i < S.length()-1 i S.length()-1 S.length() S.length S 1 i++ i++ i {
            if(S.charAt(i) == 'C'){
                count++;
            }
        } {
            if(S.charAt(i) == 'C'){
                count++;
            }
        } if(S.charAt(i) == 'C'){
                count++;
            } S.charAt(i) == 'C' S.charAt(i) S.charAt S i 'C' {
                count++;
            } count++ count if(count == 1)
                sum++; count == 1 count 1 sum++ sum int cnt = 0; cnt 0 for(int i = 1; i < S.length(); i++){
            if(S.charAt(i) - 'a' >= 0 && S.charAt(i) - 'a' <= 25){
                cnt++;
            }
        } int i = 1; int i = 1; i 1 i < S.length() i S.length() S.length S i++ i++ i {
            if(S.charAt(i) - 'a' >= 0 && S.charAt(i) - 'a' <= 25){
                cnt++;
            }
        } {
            if(S.charAt(i) - 'a' >= 0 && S.charAt(i) - 'a' <= 25){
                cnt++;
            }
        } if(S.charAt(i) - 'a' >= 0 && S.charAt(i) - 'a' <= 25){
                cnt++;
            } S.charAt(i) - 'a' >= 0 && S.charAt(i) - 'a' <= 25 S.charAt(i) - 'a' >= 0 S.charAt(i) - 'a' S.charAt(i) S.charAt S i 'a' 0 S.charAt(i) - 'a' <= 25 S.charAt(i) - 'a' S.charAt(i) S.charAt S i 'a' 25 {
                cnt++;
            } cnt++ cnt if(cnt==S.length()-2)
                sum++; cnt==S.length()-2 cnt S.length()-2 S.length() S.length S 2 sum++ sum if(sum == 3)
            System.out.println("AC");
        else
            System.out.println("WA"); sum == 3 sum 3 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();
        sc.close();

        int sum = 0;
        if(S.charAt(0) == 'A')
            sum++;
        int count = 0;
        for(int i = 2; i < S.length()-1; i++){
            if(S.charAt(i) == 'C'){
                count++;
            }
        }
        if(count == 1)
                sum++;
        int cnt = 0;
        for(int i = 1; i < S.length(); i++){
            if(S.charAt(i) - 'a' >= 0 && S.charAt(i) - 'a' <= 25){
                cnt++;
            }
        }
        if(cnt==S.length()-2)
                sum++;
        if(sum == 3)
            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();
        sc.close();

        int sum = 0;
        if(S.charAt(0) == 'A')
            sum++;
        int count = 0;
        for(int i = 2; i < S.length()-1; i++){
            if(S.charAt(i) == 'C'){
                count++;
            }
        }
        if(count == 1)
                sum++;
        int cnt = 0;
        for(int i = 1; i < S.length(); i++){
            if(S.charAt(i) - 'a' >= 0 && S.charAt(i) - 'a' <= 25){
                cnt++;
            }
        }
        if(cnt==S.length()-2)
                sum++;
        if(sum == 3)
            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();
        sc.close();

        int sum = 0;
        if(S.charAt(0) == 'A')
            sum++;
        int count = 0;
        for(int i = 2; i < S.length()-1; i++){
            if(S.charAt(i) == 'C'){
                count++;
            }
        }
        if(count == 1)
                sum++;
        int cnt = 0;
        for(int i = 1; i < S.length(); i++){
            if(S.charAt(i) - 'a' >= 0 && S.charAt(i) - 'a' <= 25){
                cnt++;
            }
        }
        if(cnt==S.length()-2)
                sum++;
        if(sum == 3)
            System.out.println("AC");
        else
            System.out.println("WA");
        
    }
}