import java.util.*;
import java.lang.*;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        String ans = "AC";
        if(s[0]!='A'){
            ans = "WA";
        }
        if(Character.isUpperCase(s[1])){
            ans = "WA";
        }
        int count = 0;
        for(int i =2;i<s.length;i++){
            if(Character.isUpperCase(s[i])){
                if(count==0&&s[i]=='C'&&i!=s.length-1){
                    count ++;
                } else {
                    ans = "WA";
                }
            }
        }
        if(count==0){
            ans ="WA";
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java import java.lang.*; lang.* java class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        String ans = "AC";
        if(s[0]!='A'){
            ans = "WA";
        }
        if(Character.isUpperCase(s[1])){
            ans = "WA";
        }
        int count = 0;
        for(int i =2;i<s.length;i++){
            if(Character.isUpperCase(s[i])){
                if(count==0&&s[i]=='C'&&i!=s.length-1){
                    count ++;
                } else {
                    ans = "WA";
                }
            }
        }
        if(count==0){
            ans ="WA";
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        String ans = "AC";
        if(s[0]!='A'){
            ans = "WA";
        }
        if(Character.isUpperCase(s[1])){
            ans = "WA";
        }
        int count = 0;
        for(int i =2;i<s.length;i++){
            if(Character.isUpperCase(s[i])){
                if(count==0&&s[i]=='C'&&i!=s.length-1){
                    count ++;
                } else {
                    ans = "WA";
                }
            }
        }
        if(count==0){
            ans ="WA";
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        String ans = "AC";
        if(s[0]!='A'){
            ans = "WA";
        }
        if(Character.isUpperCase(s[1])){
            ans = "WA";
        }
        int count = 0;
        for(int i =2;i<s.length;i++){
            if(Character.isUpperCase(s[i])){
                if(count==0&&s[i]=='C'&&i!=s.length-1){
                    count ++;
                } else {
                    ans = "WA";
                }
            }
        }
        if(count==0){
            ans ="WA";
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc String ans = "AC"; ans "AC" if(s[0]!='A'){
            ans = "WA";
        } s[0]!='A' s[0] s 0 'A' {
            ans = "WA";
        } ans = "WA" ans "WA" if(Character.isUpperCase(s[1])){
            ans = "WA";
        } Character.isUpperCase(s[1]) Character.isUpperCase Character s[1] s 1 {
            ans = "WA";
        } ans = "WA" ans "WA" int count = 0; count 0 for(int i =2;i<s.length;i++){
            if(Character.isUpperCase(s[i])){
                if(count==0&&s[i]=='C'&&i!=s.length-1){
                    count ++;
                } else {
                    ans = "WA";
                }
            }
        } int i =2; int i =2; i 2 i<s.length i s.length s s.length i++ i++ i {
            if(Character.isUpperCase(s[i])){
                if(count==0&&s[i]=='C'&&i!=s.length-1){
                    count ++;
                } else {
                    ans = "WA";
                }
            }
        } {
            if(Character.isUpperCase(s[i])){
                if(count==0&&s[i]=='C'&&i!=s.length-1){
                    count ++;
                } else {
                    ans = "WA";
                }
            }
        } if(Character.isUpperCase(s[i])){
                if(count==0&&s[i]=='C'&&i!=s.length-1){
                    count ++;
                } else {
                    ans = "WA";
                }
            } Character.isUpperCase(s[i]) Character.isUpperCase Character s[i] s i {
                if(count==0&&s[i]=='C'&&i!=s.length-1){
                    count ++;
                } else {
                    ans = "WA";
                }
            } if(count==0&&s[i]=='C'&&i!=s.length-1){
                    count ++;
                } else {
                    ans = "WA";
                } count==0&&s[i]=='C'&&i!=s.length-1 count==0&&s[i]=='C'&&i!=s.length-1 count==0 count 0 s[i]=='C' s[i] s i 'C' i!=s.length-1 i s.length-1 s.length s s.length 1 {
                    count ++;
                } count ++ count {
                    ans = "WA";
                } ans = "WA" ans "WA" if(count==0){
            ans ="WA";
        } count==0 count 0 {
            ans ="WA";
        } ans ="WA" ans "WA" System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;
import java.lang.*;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        char[] s = sc.next().toCharArray();
        String ans = "AC";
        if(s[0]!='A'){
            ans = "WA";
        }
        if(Character.isUpperCase(s[1])){
            ans = "WA";
        }
        int count = 0;
        for(int i =2;i<s.length;i++){
            if(Character.isUpperCase(s[i])){
                if(count==0&&s[i]=='C'&&i!=s.length-1){
                    count ++;
                } else {
                    ans = "WA";
                }
            }
        }
        if(count==0){
            ans ="WA";
        }
        System.out.println(ans);
    }
}