import java.util.*;
public class Main{
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int cnt = 0;
        for(int i =0; i<s.length(); i++){
            if(Character.isUpperCase(s.charAt(i))){
                cnt++;
            }
        }
        if(s.charAt(0)=='A'){
            for(int i =2; i<=s.length()-2;i++){
                if(s.charAt(i)=='C'){
                    if(cnt==2){
                        System.out.println("AC");
                        return;
                    }
                }    
            }
        }
        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();
        int cnt = 0;
        for(int i =0; i<s.length(); i++){
            if(Character.isUpperCase(s.charAt(i))){
                cnt++;
            }
        }
        if(s.charAt(0)=='A'){
            for(int i =2; i<=s.length()-2;i++){
                if(s.charAt(i)=='C'){
                    if(cnt==2){
                        System.out.println("AC");
                        return;
                    }
                }    
            }
        }
        System.out.println("WA");
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int cnt = 0;
        for(int i =0; i<s.length(); i++){
            if(Character.isUpperCase(s.charAt(i))){
                cnt++;
            }
        }
        if(s.charAt(0)=='A'){
            for(int i =2; i<=s.length()-2;i++){
                if(s.charAt(i)=='C'){
                    if(cnt==2){
                        System.out.println("AC");
                        return;
                    }
                }    
            }
        }
        System.out.println("WA");
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int cnt = 0;
        for(int i =0; i<s.length(); i++){
            if(Character.isUpperCase(s.charAt(i))){
                cnt++;
            }
        }
        if(s.charAt(0)=='A'){
            for(int i =2; i<=s.length()-2;i++){
                if(s.charAt(i)=='C'){
                    if(cnt==2){
                        System.out.println("AC");
                        return;
                    }
                }    
            }
        }
        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 int cnt = 0; cnt 0 for(int i =0; i<s.length(); i++){
            if(Character.isUpperCase(s.charAt(i))){
                cnt++;
            }
        } int i =0; int i =0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
            if(Character.isUpperCase(s.charAt(i))){
                cnt++;
            }
        } {
            if(Character.isUpperCase(s.charAt(i))){
                cnt++;
            }
        } if(Character.isUpperCase(s.charAt(i))){
                cnt++;
            } Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i {
                cnt++;
            } cnt++ cnt if(s.charAt(0)=='A'){
            for(int i =2; i<=s.length()-2;i++){
                if(s.charAt(i)=='C'){
                    if(cnt==2){
                        System.out.println("AC");
                        return;
                    }
                }    
            }
        } s.charAt(0)=='A' s.charAt(0) s.charAt s 0 'A' {
            for(int i =2; i<=s.length()-2;i++){
                if(s.charAt(i)=='C'){
                    if(cnt==2){
                        System.out.println("AC");
                        return;
                    }
                }    
            }
        } for(int i =2; i<=s.length()-2;i++){
                if(s.charAt(i)=='C'){
                    if(cnt==2){
                        System.out.println("AC");
                        return;
                    }
                }    
            } 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'){
                    if(cnt==2){
                        System.out.println("AC");
                        return;
                    }
                }    
            } {
                if(s.charAt(i)=='C'){
                    if(cnt==2){
                        System.out.println("AC");
                        return;
                    }
                }    
            } if(s.charAt(i)=='C'){
                    if(cnt==2){
                        System.out.println("AC");
                        return;
                    }
                } s.charAt(i)=='C' s.charAt(i) s.charAt s i 'C' {
                    if(cnt==2){
                        System.out.println("AC");
                        return;
                    }
                } if(cnt==2){
                        System.out.println("AC");
                        return;
                    } cnt==2 cnt 2 {
                        System.out.println("AC");
                        return;
                    } System.out.println("AC") System.out.println System.out System System.out "AC" return; 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();
        int cnt = 0;
        for(int i =0; i<s.length(); i++){
            if(Character.isUpperCase(s.charAt(i))){
                cnt++;
            }
        }
        if(s.charAt(0)=='A'){
            for(int i =2; i<=s.length()-2;i++){
                if(s.charAt(i)=='C'){
                    if(cnt==2){
                        System.out.println("AC");
                        return;
                    }
                }    
            }
        }
        System.out.println("WA");
    }
} public class Main{
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int cnt = 0;
        for(int i =0; i<s.length(); i++){
            if(Character.isUpperCase(s.charAt(i))){
                cnt++;
            }
        }
        if(s.charAt(0)=='A'){
            for(int i =2; i<=s.length()-2;i++){
                if(s.charAt(i)=='C'){
                    if(cnt==2){
                        System.out.println("AC");
                        return;
                    }
                }    
            }
        }
        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();
        int cnt = 0;
        for(int i =0; i<s.length(); i++){
            if(Character.isUpperCase(s.charAt(i))){
                cnt++;
            }
        }
        if(s.charAt(0)=='A'){
            for(int i =2; i<=s.length()-2;i++){
                if(s.charAt(i)=='C'){
                    if(cnt==2){
                        System.out.println("AC");
                        return;
                    }
                }    
            }
        }
        System.out.println("WA");
    }
}
