import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String S = sc.next();

   boolean flg = false;
   int count = 0;
   if(S.charAt(0)!='A') flg = true;
   if(S.charAt(1)=='C') flg = true;
   if(S.charAt(S.length()-1)=='C') flg = true;
   for(int i = 1;i<S.length();i++)
   {
     if(flg) break;
     if(S.charAt(i)=='C') count++;
     else if(Character.isUpperCase(S.charAt(i)))
     {
       flg = true;
     }
   }

   if(count>=2 || count == 0) flg = true;
   
   if(flg) System.out.println("WA");
   else System.out.println("AC");
 }
} import java.util.*; util.* java public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String S = sc.next();

   boolean flg = false;
   int count = 0;
   if(S.charAt(0)!='A') flg = true;
   if(S.charAt(1)=='C') flg = true;
   if(S.charAt(S.length()-1)=='C') flg = true;
   for(int i = 1;i<S.length();i++)
   {
     if(flg) break;
     if(S.charAt(i)=='C') count++;
     else if(Character.isUpperCase(S.charAt(i)))
     {
       flg = true;
     }
   }

   if(count>=2 || count == 0) flg = true;
   
   if(flg) System.out.println("WA");
   else System.out.println("AC");
 }
} Main public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String S = sc.next();

   boolean flg = false;
   int count = 0;
   if(S.charAt(0)!='A') flg = true;
   if(S.charAt(1)=='C') flg = true;
   if(S.charAt(S.length()-1)=='C') flg = true;
   for(int i = 1;i<S.length();i++)
   {
     if(flg) break;
     if(S.charAt(i)=='C') count++;
     else if(Character.isUpperCase(S.charAt(i)))
     {
       flg = true;
     }
   }

   if(count>=2 || count == 0) flg = true;
   
   if(flg) System.out.println("WA");
   else System.out.println("AC");
 } main {
   Scanner sc = new Scanner(System.in);
   String S = sc.next();

   boolean flg = false;
   int count = 0;
   if(S.charAt(0)!='A') flg = true;
   if(S.charAt(1)=='C') flg = true;
   if(S.charAt(S.length()-1)=='C') flg = true;
   for(int i = 1;i<S.length();i++)
   {
     if(flg) break;
     if(S.charAt(i)=='C') count++;
     else if(Character.isUpperCase(S.charAt(i)))
     {
       flg = true;
     }
   }

   if(count>=2 || count == 0) flg = true;
   
   if(flg) System.out.println("WA");
   else System.out.println("AC");
 } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc boolean flg = false; flg false int count = 0; count 0 if(S.charAt(0)!='A') flg = true; S.charAt(0)!='A' S.charAt(0) S.charAt S 0 'A' flg = true flg true if(S.charAt(1)=='C') flg = true; S.charAt(1)=='C' S.charAt(1) S.charAt S 1 'C' flg = true flg true if(S.charAt(S.length()-1)=='C') flg = true; S.charAt(S.length()-1)=='C' S.charAt(S.length()-1) S.charAt S S.length()-1 S.length() S.length S 1 'C' flg = true flg true for(int i = 1;i<S.length();i++)
   {
     if(flg) break;
     if(S.charAt(i)=='C') count++;
     else if(Character.isUpperCase(S.charAt(i)))
     {
       flg = true;
     }
   } int i = 1; int i = 1; i 1 i<S.length() i S.length() S.length S i++ i++ i {
     if(flg) break;
     if(S.charAt(i)=='C') count++;
     else if(Character.isUpperCase(S.charAt(i)))
     {
       flg = true;
     }
   } {
     if(flg) break;
     if(S.charAt(i)=='C') count++;
     else if(Character.isUpperCase(S.charAt(i)))
     {
       flg = true;
     }
   } if(flg) break; flg break; if(S.charAt(i)=='C') count++;
     else if(Character.isUpperCase(S.charAt(i)))
     {
       flg = true;
     } S.charAt(i)=='C' S.charAt(i) S.charAt S i 'C' count++ count if(Character.isUpperCase(S.charAt(i)))
     {
       flg = true;
     } Character.isUpperCase(S.charAt(i)) Character.isUpperCase Character S.charAt(i) S.charAt S i {
       flg = true;
     } flg = true flg true if(count>=2 || count == 0) flg = true; count>=2 || count == 0 count>=2 count 2 count == 0 count 0 flg = true flg true if(flg) System.out.println("WA");
   else System.out.println("AC"); flg System.out.println("WA") System.out.println System.out System System.out "WA" System.out.println("AC") System.out.println System.out System System.out "AC" String[] args args public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String S = sc.next();

   boolean flg = false;
   int count = 0;
   if(S.charAt(0)!='A') flg = true;
   if(S.charAt(1)=='C') flg = true;
   if(S.charAt(S.length()-1)=='C') flg = true;
   for(int i = 1;i<S.length();i++)
   {
     if(flg) break;
     if(S.charAt(i)=='C') count++;
     else if(Character.isUpperCase(S.charAt(i)))
     {
       flg = true;
     }
   }

   if(count>=2 || count == 0) flg = true;
   
   if(flg) System.out.println("WA");
   else System.out.println("AC");
 }
} public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String S = sc.next();

   boolean flg = false;
   int count = 0;
   if(S.charAt(0)!='A') flg = true;
   if(S.charAt(1)=='C') flg = true;
   if(S.charAt(S.length()-1)=='C') flg = true;
   for(int i = 1;i<S.length();i++)
   {
     if(flg) break;
     if(S.charAt(i)=='C') count++;
     else if(Character.isUpperCase(S.charAt(i)))
     {
       flg = true;
     }
   }

   if(count>=2 || count == 0) flg = true;
   
   if(flg) System.out.println("WA");
   else System.out.println("AC");
 }
} Main
import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String S = sc.next();

   boolean flg = false;
   int count = 0;
   if(S.charAt(0)!='A') flg = true;
   if(S.charAt(1)=='C') flg = true;
   if(S.charAt(S.length()-1)=='C') flg = true;
   for(int i = 1;i<S.length();i++)
   {
     if(flg) break;
     if(S.charAt(i)=='C') count++;
     else if(Character.isUpperCase(S.charAt(i)))
     {
       flg = true;
     }
   }

   if(count>=2 || count == 0) flg = true;
   
   if(flg) System.out.println("WA");
   else System.out.println("AC");
 }
}