import java.util.*;
import java.util.ArrayList;
import java.util.Collections;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int flag = 1;
        if(s.charAt(0) != 'A'){
            flag = 0;
        }
        int countc = 0;
        for(int i = 2; i <= s.length()-2; i++){
            if(s.charAt(i) == 'C'){
                countc++;
            }
        }
        if(countc != 1){
            flag = 0;
        }
        if(s.charAt(1) <= 'Z' || s.charAt(s.length()-1) <= 'Z'){
            flag = 0;
        }
        if(flag == 1){
            System.out.print("AC");
        } else {
            System.out.print("WA");
        }
    }
} import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int flag = 1;
        if(s.charAt(0) != 'A'){
            flag = 0;
        }
        int countc = 0;
        for(int i = 2; i <= s.length()-2; i++){
            if(s.charAt(i) == 'C'){
                countc++;
            }
        }
        if(countc != 1){
            flag = 0;
        }
        if(s.charAt(1) <= 'Z' || s.charAt(s.length()-1) <= 'Z'){
            flag = 0;
        }
        if(flag == 1){
            System.out.print("AC");
        } else {
            System.out.print("WA");
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int flag = 1;
        if(s.charAt(0) != 'A'){
            flag = 0;
        }
        int countc = 0;
        for(int i = 2; i <= s.length()-2; i++){
            if(s.charAt(i) == 'C'){
                countc++;
            }
        }
        if(countc != 1){
            flag = 0;
        }
        if(s.charAt(1) <= 'Z' || s.charAt(s.length()-1) <= 'Z'){
            flag = 0;
        }
        if(flag == 1){
            System.out.print("AC");
        } else {
            System.out.print("WA");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int flag = 1;
        if(s.charAt(0) != 'A'){
            flag = 0;
        }
        int countc = 0;
        for(int i = 2; i <= s.length()-2; i++){
            if(s.charAt(i) == 'C'){
                countc++;
            }
        }
        if(countc != 1){
            flag = 0;
        }
        if(s.charAt(1) <= 'Z' || s.charAt(s.length()-1) <= 'Z'){
            flag = 0;
        }
        if(flag == 1){
            System.out.print("AC");
        } else {
            System.out.print("WA");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int flag = 1; flag 1 if(s.charAt(0) != 'A'){
            flag = 0;
        } s.charAt(0) != 'A' s.charAt(0) s.charAt s 0 'A' {
            flag = 0;
        } flag = 0 flag 0 int countc = 0; countc 0 for(int i = 2; i <= s.length()-2; i++){
            if(s.charAt(i) == 'C'){
                countc++;
            }
        } 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'){
                countc++;
            }
        } {
            if(s.charAt(i) == 'C'){
                countc++;
            }
        } if(s.charAt(i) == 'C'){
                countc++;
            } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
                countc++;
            } countc++ countc if(countc != 1){
            flag = 0;
        } countc != 1 countc 1 {
            flag = 0;
        } flag = 0 flag 0 if(s.charAt(1) <= 'Z' || s.charAt(s.length()-1) <= 'Z'){
            flag = 0;
        } s.charAt(1) <= 'Z' || s.charAt(s.length()-1) <= 'Z' s.charAt(1) <= 'Z' s.charAt(1) s.charAt s 1 'Z' s.charAt(s.length()-1) <= 'Z' s.charAt(s.length()-1) s.charAt s s.length()-1 s.length() s.length s 1 'Z' {
            flag = 0;
        } flag = 0 flag 0 if(flag == 1){
            System.out.print("AC");
        } else {
            System.out.print("WA");
        } flag == 1 flag 1 {
            System.out.print("AC");
        } System.out.print("AC") System.out.print System.out System System.out "AC" {
            System.out.print("WA");
        } System.out.print("WA") System.out.print 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();
        int flag = 1;
        if(s.charAt(0) != 'A'){
            flag = 0;
        }
        int countc = 0;
        for(int i = 2; i <= s.length()-2; i++){
            if(s.charAt(i) == 'C'){
                countc++;
            }
        }
        if(countc != 1){
            flag = 0;
        }
        if(s.charAt(1) <= 'Z' || s.charAt(s.length()-1) <= 'Z'){
            flag = 0;
        }
        if(flag == 1){
            System.out.print("AC");
        } else {
            System.out.print("WA");
        }
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int flag = 1;
        if(s.charAt(0) != 'A'){
            flag = 0;
        }
        int countc = 0;
        for(int i = 2; i <= s.length()-2; i++){
            if(s.charAt(i) == 'C'){
                countc++;
            }
        }
        if(countc != 1){
            flag = 0;
        }
        if(s.charAt(1) <= 'Z' || s.charAt(s.length()-1) <= 'Z'){
            flag = 0;
        }
        if(flag == 1){
            System.out.print("AC");
        } else {
            System.out.print("WA");
        }
    }
} Main
import java.util.*;
import java.util.ArrayList;
import java.util.Collections;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int flag = 1;
        if(s.charAt(0) != 'A'){
            flag = 0;
        }
        int countc = 0;
        for(int i = 2; i <= s.length()-2; i++){
            if(s.charAt(i) == 'C'){
                countc++;
            }
        }
        if(countc != 1){
            flag = 0;
        }
        if(s.charAt(1) <= 'Z' || s.charAt(s.length()-1) <= 'Z'){
            flag = 0;
        }
        if(flag == 1){
            System.out.print("AC");
        } else {
            System.out.print("WA");
        }
    }
}