import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String s = sc.next();

    int count = 0;
    int s_research = 0;

    if(s.charAt(0) == 'A'){

    }else{
        count++;
    }

    //System.out.println(count);
    for(int i = 2 ; i < s.length()-1;i++){
        if(s.charAt(i) == 'C'){
            if(s_research==0){
                s_research++;
            }else{
                count++;
            }
        }
    }

    //System.out.println(count);

    for(int i = 1; i < s.length() ; i++){
        if( Character.isUpperCase( s.charAt( i ) ) ) {
            if(s.charAt(i) == 'C'){
                
            }else{
                count++;
            }
        }else {

         }
    }

    

    //System.out.println(s_research);
    //System.out.println(count);
    if(s_research == 0){
        System.out.println("WA");
    }else if(count == 0){
        System.out.println("AC");
    }else{
        System.out.println("WA");
    }

    

    
  

    
    
    


    


    
    


    
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.*; io.* java import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util import java.util.Iterator; Iterator java.util import java.util.List; List java.util import java.util.Collections; Collections java.util public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String s = sc.next();

    int count = 0;
    int s_research = 0;

    if(s.charAt(0) == 'A'){

    }else{
        count++;
    }

    //System.out.println(count);
    for(int i = 2 ; i < s.length()-1;i++){
        if(s.charAt(i) == 'C'){
            if(s_research==0){
                s_research++;
            }else{
                count++;
            }
        }
    }

    //System.out.println(count);

    for(int i = 1; i < s.length() ; i++){
        if( Character.isUpperCase( s.charAt( i ) ) ) {
            if(s.charAt(i) == 'C'){
                
            }else{
                count++;
            }
        }else {

         }
    }

    

    //System.out.println(s_research);
    //System.out.println(count);
    if(s_research == 0){
        System.out.println("WA");
    }else if(count == 0){
        System.out.println("AC");
    }else{
        System.out.println("WA");
    }

    

    
  

    
    
    


    


    
    


    
	}
} Main public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String s = sc.next();

    int count = 0;
    int s_research = 0;

    if(s.charAt(0) == 'A'){

    }else{
        count++;
    }

    //System.out.println(count);
    for(int i = 2 ; i < s.length()-1;i++){
        if(s.charAt(i) == 'C'){
            if(s_research==0){
                s_research++;
            }else{
                count++;
            }
        }
    }

    //System.out.println(count);

    for(int i = 1; i < s.length() ; i++){
        if( Character.isUpperCase( s.charAt( i ) ) ) {
            if(s.charAt(i) == 'C'){
                
            }else{
                count++;
            }
        }else {

         }
    }

    

    //System.out.println(s_research);
    //System.out.println(count);
    if(s_research == 0){
        System.out.println("WA");
    }else if(count == 0){
        System.out.println("AC");
    }else{
        System.out.println("WA");
    }

    

    
  

    
    
    


    


    
    


    
	} main {
    
    Scanner sc = new Scanner(System.in);
    
    String s = sc.next();

    int count = 0;
    int s_research = 0;

    if(s.charAt(0) == 'A'){

    }else{
        count++;
    }

    //System.out.println(count);
    for(int i = 2 ; i < s.length()-1;i++){
        if(s.charAt(i) == 'C'){
            if(s_research==0){
                s_research++;
            }else{
                count++;
            }
        }
    }

    //System.out.println(count);

    for(int i = 1; i < s.length() ; i++){
        if( Character.isUpperCase( s.charAt( i ) ) ) {
            if(s.charAt(i) == 'C'){
                
            }else{
                count++;
            }
        }else {

         }
    }

    

    //System.out.println(s_research);
    //System.out.println(count);
    if(s_research == 0){
        System.out.println("WA");
    }else if(count == 0){
        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 int count = 0; count 0 int s_research = 0; s_research 0 if(s.charAt(0) == 'A'){

    }else{
        count++;
    } s.charAt(0) == 'A' s.charAt(0) s.charAt s 0 'A' {

    } {
        count++;
    } count++ count for(int i = 2 ; i < s.length()-1;i++){
        if(s.charAt(i) == 'C'){
            if(s_research==0){
                s_research++;
            }else{
                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'){
            if(s_research==0){
                s_research++;
            }else{
                count++;
            }
        }
    } {
        if(s.charAt(i) == 'C'){
            if(s_research==0){
                s_research++;
            }else{
                count++;
            }
        }
    } if(s.charAt(i) == 'C'){
            if(s_research==0){
                s_research++;
            }else{
                count++;
            }
        } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
            if(s_research==0){
                s_research++;
            }else{
                count++;
            }
        } if(s_research==0){
                s_research++;
            }else{
                count++;
            } s_research==0 s_research 0 {
                s_research++;
            } s_research++ s_research {
                count++;
            } count++ count for(int i = 1; i < s.length() ; i++){
        if( Character.isUpperCase( s.charAt( i ) ) ) {
            if(s.charAt(i) == 'C'){
                
            }else{
                count++;
            }
        }else {

         }
    } int i = 1; int i = 1; i 1 i < s.length() i s.length() s.length s i++ i++ i {
        if( Character.isUpperCase( s.charAt( i ) ) ) {
            if(s.charAt(i) == 'C'){
                
            }else{
                count++;
            }
        }else {

         }
    } {
        if( Character.isUpperCase( s.charAt( i ) ) ) {
            if(s.charAt(i) == 'C'){
                
            }else{
                count++;
            }
        }else {

         }
    } if( Character.isUpperCase( s.charAt( i ) ) ) {
            if(s.charAt(i) == 'C'){
                
            }else{
                count++;
            }
        }else {

         } Character.isUpperCase( s.charAt( i ) ) Character.isUpperCase Character s.charAt( i ) s.charAt s i {
            if(s.charAt(i) == 'C'){
                
            }else{
                count++;
            }
        } if(s.charAt(i) == 'C'){
                
            }else{
                count++;
            } s.charAt(i) == 'C' s.charAt(i) s.charAt s i 'C' {
                
            } {
                count++;
            } count++ count {

         } if(s_research == 0){
        System.out.println("WA");
    }else if(count == 0){
        System.out.println("AC");
    }else{
        System.out.println("WA");
    } s_research == 0 s_research 0 {
        System.out.println("WA");
    } System.out.println("WA") System.out.println System.out System System.out "WA" if(count == 0){
        System.out.println("AC");
    }else{
        System.out.println("WA");
    } count == 0 count 0 {
        System.out.println("AC");
    } System.out.println("AC") System.out.println System.out System System.out "AC" {
        System.out.println("WA");
    } System.out.println("WA") System.out.println System.out System System.out "WA" final String[] args args public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String s = sc.next();

    int count = 0;
    int s_research = 0;

    if(s.charAt(0) == 'A'){

    }else{
        count++;
    }

    //System.out.println(count);
    for(int i = 2 ; i < s.length()-1;i++){
        if(s.charAt(i) == 'C'){
            if(s_research==0){
                s_research++;
            }else{
                count++;
            }
        }
    }

    //System.out.println(count);

    for(int i = 1; i < s.length() ; i++){
        if( Character.isUpperCase( s.charAt( i ) ) ) {
            if(s.charAt(i) == 'C'){
                
            }else{
                count++;
            }
        }else {

         }
    }

    

    //System.out.println(s_research);
    //System.out.println(count);
    if(s_research == 0){
        System.out.println("WA");
    }else if(count == 0){
        System.out.println("AC");
    }else{
        System.out.println("WA");
    }

    

    
  

    
    
    


    


    
    


    
	}
} public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String s = sc.next();

    int count = 0;
    int s_research = 0;

    if(s.charAt(0) == 'A'){

    }else{
        count++;
    }

    //System.out.println(count);
    for(int i = 2 ; i < s.length()-1;i++){
        if(s.charAt(i) == 'C'){
            if(s_research==0){
                s_research++;
            }else{
                count++;
            }
        }
    }

    //System.out.println(count);

    for(int i = 1; i < s.length() ; i++){
        if( Character.isUpperCase( s.charAt( i ) ) ) {
            if(s.charAt(i) == 'C'){
                
            }else{
                count++;
            }
        }else {

         }
    }

    

    //System.out.println(s_research);
    //System.out.println(count);
    if(s_research == 0){
        System.out.println("WA");
    }else if(count == 0){
        System.out.println("AC");
    }else{
        System.out.println("WA");
    }

    

    
  

    
    
    


    


    
    


    
	}
} Main
import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    String s = sc.next();

    int count = 0;
    int s_research = 0;

    if(s.charAt(0) == 'A'){

    }else{
        count++;
    }

    //System.out.println(count);
    for(int i = 2 ; i < s.length()-1;i++){
        if(s.charAt(i) == 'C'){
            if(s_research==0){
                s_research++;
            }else{
                count++;
            }
        }
    }

    //System.out.println(count);

    for(int i = 1; i < s.length() ; i++){
        if( Character.isUpperCase( s.charAt( i ) ) ) {
            if(s.charAt(i) == 'C'){
                
            }else{
                count++;
            }
        }else {

         }
    }

    

    //System.out.println(s_research);
    //System.out.println(count);
    if(s_research == 0){
        System.out.println("WA");
    }else if(count == 0){
        System.out.println("AC");
    }else{
        System.out.println("WA");
    }

    

    
  

    
    
    


    


    
    


    
	}
}