import java.awt.Point;
import java.util.ArrayDeque;
import java.util.Scanner;
import java.util.*;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Set;
import java.util.HashSet;
import java.util.Collection;


 
public class Main{
	
        static final Scanner sc=new Scanner(System.in);
        
        
        
        
        
        
        public static void main(String[]args){
                String S=sc.next();
                int n=S.length();
                int x=0;
                if(S.charAt(0)=='A'){
                        if(Character.isLowerCase(S.charAt(1))){
                                for(int i=2;i<n-1;i++){
                                        if((Character.isLowerCase(S.charAt(i)))||((S.charAt(i)=='C')&&(x==0))){
                                                if(S.charAt(i)=='C'){
                                                        x++;
                                                }

                                        }else{
                                                System.out.println("WA");
                                                x=100;
                                                break;
                                                
                                        }

                                }
                                if(x!=100){
                                if((Character.isLowerCase(S.charAt(n-1)))&&(x==1)){
                                        System.out.println("AC");
                                }else{
                                        System.out.println("WA");
                                }}



                        }else{
                                System.out.println("WA");
                        }
                }else{
                        System.out.println("WA");
                }


                
                
                
                


                
        }
        
        
        

		
	
} import java.awt.Point; Point java.awt import java.util.ArrayDeque; ArrayDeque java.util import java.util.Scanner; Scanner java.util import java.util.*; util.* java import java.util.Arrays; Arrays java.util import java.util.ArrayList; ArrayList java.util import java.util.Set; Set java.util import java.util.HashSet; HashSet java.util import java.util.Collection; Collection java.util public class Main{
	
        static final Scanner sc=new Scanner(System.in);
        
        
        
        
        
        
        public static void main(String[]args){
                String S=sc.next();
                int n=S.length();
                int x=0;
                if(S.charAt(0)=='A'){
                        if(Character.isLowerCase(S.charAt(1))){
                                for(int i=2;i<n-1;i++){
                                        if((Character.isLowerCase(S.charAt(i)))||((S.charAt(i)=='C')&&(x==0))){
                                                if(S.charAt(i)=='C'){
                                                        x++;
                                                }

                                        }else{
                                                System.out.println("WA");
                                                x=100;
                                                break;
                                                
                                        }

                                }
                                if(x!=100){
                                if((Character.isLowerCase(S.charAt(n-1)))&&(x==1)){
                                        System.out.println("AC");
                                }else{
                                        System.out.println("WA");
                                }}



                        }else{
                                System.out.println("WA");
                        }
                }else{
                        System.out.println("WA");
                }


                
                
                
                


                
        }
        
        
        

		
	
} Main static final Scanner sc=new Scanner(System.in); sc new Scanner(System.in) public static void main(String[]args){
                String S=sc.next();
                int n=S.length();
                int x=0;
                if(S.charAt(0)=='A'){
                        if(Character.isLowerCase(S.charAt(1))){
                                for(int i=2;i<n-1;i++){
                                        if((Character.isLowerCase(S.charAt(i)))||((S.charAt(i)=='C')&&(x==0))){
                                                if(S.charAt(i)=='C'){
                                                        x++;
                                                }

                                        }else{
                                                System.out.println("WA");
                                                x=100;
                                                break;
                                                
                                        }

                                }
                                if(x!=100){
                                if((Character.isLowerCase(S.charAt(n-1)))&&(x==1)){
                                        System.out.println("AC");
                                }else{
                                        System.out.println("WA");
                                }}



                        }else{
                                System.out.println("WA");
                        }
                }else{
                        System.out.println("WA");
                }


                
                
                
                


                
        } main {
                String S=sc.next();
                int n=S.length();
                int x=0;
                if(S.charAt(0)=='A'){
                        if(Character.isLowerCase(S.charAt(1))){
                                for(int i=2;i<n-1;i++){
                                        if((Character.isLowerCase(S.charAt(i)))||((S.charAt(i)=='C')&&(x==0))){
                                                if(S.charAt(i)=='C'){
                                                        x++;
                                                }

                                        }else{
                                                System.out.println("WA");
                                                x=100;
                                                break;
                                                
                                        }

                                }
                                if(x!=100){
                                if((Character.isLowerCase(S.charAt(n-1)))&&(x==1)){
                                        System.out.println("AC");
                                }else{
                                        System.out.println("WA");
                                }}



                        }else{
                                System.out.println("WA");
                        }
                }else{
                        System.out.println("WA");
                }


                
                
                
                


                
        } String S=sc.next(); S sc.next() sc.next sc int n=S.length(); n S.length() S.length S int x=0; x 0 if(S.charAt(0)=='A'){
                        if(Character.isLowerCase(S.charAt(1))){
                                for(int i=2;i<n-1;i++){
                                        if((Character.isLowerCase(S.charAt(i)))||((S.charAt(i)=='C')&&(x==0))){
                                                if(S.charAt(i)=='C'){
                                                        x++;
                                                }

                                        }else{
                                                System.out.println("WA");
                                                x=100;
                                                break;
                                                
                                        }

                                }
                                if(x!=100){
                                if((Character.isLowerCase(S.charAt(n-1)))&&(x==1)){
                                        System.out.println("AC");
                                }else{
                                        System.out.println("WA");
                                }}



                        }else{
                                System.out.println("WA");
                        }
                }else{
                        System.out.println("WA");
                } S.charAt(0)=='A' S.charAt(0) S.charAt S 0 'A' {
                        if(Character.isLowerCase(S.charAt(1))){
                                for(int i=2;i<n-1;i++){
                                        if((Character.isLowerCase(S.charAt(i)))||((S.charAt(i)=='C')&&(x==0))){
                                                if(S.charAt(i)=='C'){
                                                        x++;
                                                }

                                        }else{
                                                System.out.println("WA");
                                                x=100;
                                                break;
                                                
                                        }

                                }
                                if(x!=100){
                                if((Character.isLowerCase(S.charAt(n-1)))&&(x==1)){
                                        System.out.println("AC");
                                }else{
                                        System.out.println("WA");
                                }}



                        }else{
                                System.out.println("WA");
                        }
                } if(Character.isLowerCase(S.charAt(1))){
                                for(int i=2;i<n-1;i++){
                                        if((Character.isLowerCase(S.charAt(i)))||((S.charAt(i)=='C')&&(x==0))){
                                                if(S.charAt(i)=='C'){
                                                        x++;
                                                }

                                        }else{
                                                System.out.println("WA");
                                                x=100;
                                                break;
                                                
                                        }

                                }
                                if(x!=100){
                                if((Character.isLowerCase(S.charAt(n-1)))&&(x==1)){
                                        System.out.println("AC");
                                }else{
                                        System.out.println("WA");
                                }}



                        }else{
                                System.out.println("WA");
                        } Character.isLowerCase(S.charAt(1)) Character.isLowerCase Character S.charAt(1) S.charAt S 1 {
                                for(int i=2;i<n-1;i++){
                                        if((Character.isLowerCase(S.charAt(i)))||((S.charAt(i)=='C')&&(x==0))){
                                                if(S.charAt(i)=='C'){
                                                        x++;
                                                }

                                        }else{
                                                System.out.println("WA");
                                                x=100;
                                                break;
                                                
                                        }

                                }
                                if(x!=100){
                                if((Character.isLowerCase(S.charAt(n-1)))&&(x==1)){
                                        System.out.println("AC");
                                }else{
                                        System.out.println("WA");
                                }}



                        } for(int i=2;i<n-1;i++){
                                        if((Character.isLowerCase(S.charAt(i)))||((S.charAt(i)=='C')&&(x==0))){
                                                if(S.charAt(i)=='C'){
                                                        x++;
                                                }

                                        }else{
                                                System.out.println("WA");
                                                x=100;
                                                break;
                                                
                                        }

                                } int i=2; int i=2; i 2 i<n-1 i n-1 n 1 i++ i++ i {
                                        if((Character.isLowerCase(S.charAt(i)))||((S.charAt(i)=='C')&&(x==0))){
                                                if(S.charAt(i)=='C'){
                                                        x++;
                                                }

                                        }else{
                                                System.out.println("WA");
                                                x=100;
                                                break;
                                                
                                        }

                                } {
                                        if((Character.isLowerCase(S.charAt(i)))||((S.charAt(i)=='C')&&(x==0))){
                                                if(S.charAt(i)=='C'){
                                                        x++;
                                                }

                                        }else{
                                                System.out.println("WA");
                                                x=100;
                                                break;
                                                
                                        }

                                } if((Character.isLowerCase(S.charAt(i)))||((S.charAt(i)=='C')&&(x==0))){
                                                if(S.charAt(i)=='C'){
                                                        x++;
                                                }

                                        }else{
                                                System.out.println("WA");
                                                x=100;
                                                break;
                                                
                                        } (Character.isLowerCase(S.charAt(i)))||((S.charAt(i)=='C')&&(x==0)) (Character.isLowerCase(S.charAt(i))) Character.isLowerCase Character S.charAt(i) S.charAt S i ((S.charAt(i)=='C')&&(x==0)) (S.charAt(i)=='C') S.charAt(i) S.charAt S i 'C' (x==0) x 0 {
                                                if(S.charAt(i)=='C'){
                                                        x++;
                                                }

                                        } if(S.charAt(i)=='C'){
                                                        x++;
                                                } S.charAt(i)=='C' S.charAt(i) S.charAt S i 'C' {
                                                        x++;
                                                } x++ x {
                                                System.out.println("WA");
                                                x=100;
                                                break;
                                                
                                        } System.out.println("WA") System.out.println System.out System System.out "WA" x=100 x 100 break; if(x!=100){
                                if((Character.isLowerCase(S.charAt(n-1)))&&(x==1)){
                                        System.out.println("AC");
                                }else{
                                        System.out.println("WA");
                                }} x!=100 x 100 {
                                if((Character.isLowerCase(S.charAt(n-1)))&&(x==1)){
                                        System.out.println("AC");
                                }else{
                                        System.out.println("WA");
                                }} if((Character.isLowerCase(S.charAt(n-1)))&&(x==1)){
                                        System.out.println("AC");
                                }else{
                                        System.out.println("WA");
                                } (Character.isLowerCase(S.charAt(n-1)))&&(x==1) (Character.isLowerCase(S.charAt(n-1))) Character.isLowerCase Character S.charAt(n-1) S.charAt S n-1 n 1 (x==1) x 1 {
                                        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" {
                                System.out.println("WA");
                        } System.out.println("WA") System.out.println System.out System System.out "WA" {
                        System.out.println("WA");
                } System.out.println("WA") System.out.println System.out System System.out "WA" String[]args args public class Main{
	
        static final Scanner sc=new Scanner(System.in);
        
        
        
        
        
        
        public static void main(String[]args){
                String S=sc.next();
                int n=S.length();
                int x=0;
                if(S.charAt(0)=='A'){
                        if(Character.isLowerCase(S.charAt(1))){
                                for(int i=2;i<n-1;i++){
                                        if((Character.isLowerCase(S.charAt(i)))||((S.charAt(i)=='C')&&(x==0))){
                                                if(S.charAt(i)=='C'){
                                                        x++;
                                                }

                                        }else{
                                                System.out.println("WA");
                                                x=100;
                                                break;
                                                
                                        }

                                }
                                if(x!=100){
                                if((Character.isLowerCase(S.charAt(n-1)))&&(x==1)){
                                        System.out.println("AC");
                                }else{
                                        System.out.println("WA");
                                }}



                        }else{
                                System.out.println("WA");
                        }
                }else{
                        System.out.println("WA");
                }


                
                
                
                


                
        }
        
        
        

		
	
} public class Main{
	
        static final Scanner sc=new Scanner(System.in);
        
        
        
        
        
        
        public static void main(String[]args){
                String S=sc.next();
                int n=S.length();
                int x=0;
                if(S.charAt(0)=='A'){
                        if(Character.isLowerCase(S.charAt(1))){
                                for(int i=2;i<n-1;i++){
                                        if((Character.isLowerCase(S.charAt(i)))||((S.charAt(i)=='C')&&(x==0))){
                                                if(S.charAt(i)=='C'){
                                                        x++;
                                                }

                                        }else{
                                                System.out.println("WA");
                                                x=100;
                                                break;
                                                
                                        }

                                }
                                if(x!=100){
                                if((Character.isLowerCase(S.charAt(n-1)))&&(x==1)){
                                        System.out.println("AC");
                                }else{
                                        System.out.println("WA");
                                }}



                        }else{
                                System.out.println("WA");
                        }
                }else{
                        System.out.println("WA");
                }


                
                
                
                


                
        }
        
        
        

		
	
} Main
import java.awt.Point;
import java.util.ArrayDeque;
import java.util.Scanner;
import java.util.*;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Set;
import java.util.HashSet;
import java.util.Collection;


 
public class Main{
	
        static final Scanner sc=new Scanner(System.in);
        
        
        
        
        
        
        public static void main(String[]args){
                String S=sc.next();
                int n=S.length();
                int x=0;
                if(S.charAt(0)=='A'){
                        if(Character.isLowerCase(S.charAt(1))){
                                for(int i=2;i<n-1;i++){
                                        if((Character.isLowerCase(S.charAt(i)))||((S.charAt(i)=='C')&&(x==0))){
                                                if(S.charAt(i)=='C'){
                                                        x++;
                                                }

                                        }else{
                                                System.out.println("WA");
                                                x=100;
                                                break;
                                                
                                        }

                                }
                                if(x!=100){
                                if((Character.isLowerCase(S.charAt(n-1)))&&(x==1)){
                                        System.out.println("AC");
                                }else{
                                        System.out.println("WA");
                                }}



                        }else{
                                System.out.println("WA");
                        }
                }else{
                        System.out.println("WA");
                }


                
                
                
                


                
        }
        
        
        

		
	
}
