import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        String s = scan.next();
        int Ccount = 0;
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
            System.exit(0);
        }
        for(int i = 1; i < s.length(); i++){
            if(i >= 2 && i < s.length() - 1){
                char c = s.charAt(i);
                if(c == 'C')Ccount++;
                else if(c >= 'A' && c <='Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
            else {
                char c = s.charAt(i);
                if(c >= 'A' && c <= 'Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        }
        if(Ccount == 1)System.out.println("AC");
        else System.out.println("WA");
        return;
    }
}                                                                     import java.util.*; util.* java class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        String s = scan.next();
        int Ccount = 0;
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
            System.exit(0);
        }
        for(int i = 1; i < s.length(); i++){
            if(i >= 2 && i < s.length() - 1){
                char c = s.charAt(i);
                if(c == 'C')Ccount++;
                else if(c >= 'A' && c <='Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
            else {
                char c = s.charAt(i);
                if(c >= 'A' && c <= 'Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        }
        if(Ccount == 1)System.out.println("AC");
        else System.out.println("WA");
        return;
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        String s = scan.next();
        int Ccount = 0;
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
            System.exit(0);
        }
        for(int i = 1; i < s.length(); i++){
            if(i >= 2 && i < s.length() - 1){
                char c = s.charAt(i);
                if(c == 'C')Ccount++;
                else if(c >= 'A' && c <='Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
            else {
                char c = s.charAt(i);
                if(c >= 'A' && c <= 'Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        }
        if(Ccount == 1)System.out.println("AC");
        else System.out.println("WA");
        return;
    } main {
        Scanner scan = new Scanner(System.in);

        String s = scan.next();
        int Ccount = 0;
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
            System.exit(0);
        }
        for(int i = 1; i < s.length(); i++){
            if(i >= 2 && i < s.length() - 1){
                char c = s.charAt(i);
                if(c == 'C')Ccount++;
                else if(c >= 'A' && c <='Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
            else {
                char c = s.charAt(i);
                if(c >= 'A' && c <= 'Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        }
        if(Ccount == 1)System.out.println("AC");
        else System.out.println("WA");
        return;
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.next(); s scan.next() scan.next scan int Ccount = 0; Ccount 0 if(s.charAt(0) != 'A'){
            System.out.println("WA");
            System.exit(0);
        } s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' {
            System.out.println("WA");
            System.exit(0);
        } System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 for(int i = 1; i < s.length(); i++){
            if(i >= 2 && i < s.length() - 1){
                char c = s.charAt(i);
                if(c == 'C')Ccount++;
                else if(c >= 'A' && c <='Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
            else {
                char c = s.charAt(i);
                if(c >= 'A' && c <= 'Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        } int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
            if(i >= 2 && i < s.length() - 1){
                char c = s.charAt(i);
                if(c == 'C')Ccount++;
                else if(c >= 'A' && c <='Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
            else {
                char c = s.charAt(i);
                if(c >= 'A' && c <= 'Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        } {
            if(i >= 2 && i < s.length() - 1){
                char c = s.charAt(i);
                if(c == 'C')Ccount++;
                else if(c >= 'A' && c <='Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
            else {
                char c = s.charAt(i);
                if(c >= 'A' && c <= 'Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        } if(i >= 2 && i < s.length() - 1){
                char c = s.charAt(i);
                if(c == 'C')Ccount++;
                else if(c >= 'A' && c <='Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
            else {
                char c = s.charAt(i);
                if(c >= 'A' && c <= 'Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            } i >= 2 && i < s.length() - 1 i >= 2 i 2 i < s.length() - 1 i s.length() - 1 s.length() s.length s 1 {
                char c = s.charAt(i);
                if(c == 'C')Ccount++;
                else if(c >= 'A' && c <='Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            } char c = s.charAt(i); c s.charAt(i) s.charAt s i if(c == 'C')Ccount++;
                else if(c >= 'A' && c <='Z'){
                    System.out.println("WA");
                    System.exit(0);
                } c == 'C' c 'C' Ccount++ Ccount if(c >= 'A' && c <='Z'){
                    System.out.println("WA");
                    System.exit(0);
                } c >= 'A' && c <='Z' c >= 'A' c 'A' c <='Z' c 'Z' {
                    System.out.println("WA");
                    System.exit(0);
                } System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 {
                char c = s.charAt(i);
                if(c >= 'A' && c <= 'Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            } char c = s.charAt(i); c s.charAt(i) s.charAt s i if(c >= 'A' && c <= 'Z'){
                    System.out.println("WA");
                    System.exit(0);
                } c >= 'A' && c <= 'Z' c >= 'A' c 'A' c <= 'Z' c 'Z' {
                    System.out.println("WA");
                    System.exit(0);
                } System.out.println("WA") System.out.println System.out System System.out "WA" System.exit(0) System.exit System 0 if(Ccount == 1)System.out.println("AC");
        else System.out.println("WA"); Ccount == 1 Ccount 1 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" return; String[] args args
import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        String s = scan.next();
        int Ccount = 0;
        if(s.charAt(0) != 'A'){
            System.out.println("WA");
            System.exit(0);
        }
        for(int i = 1; i < s.length(); i++){
            if(i >= 2 && i < s.length() - 1){
                char c = s.charAt(i);
                if(c == 'C')Ccount++;
                else if(c >= 'A' && c <='Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
            else {
                char c = s.charAt(i);
                if(c >= 'A' && c <= 'Z'){
                    System.out.println("WA");
                    System.exit(0);
                }
            }
        }
        if(Ccount == 1)System.out.println("AC");
        else System.out.println("WA");
        return;
    }
}                                                                    