#include <iostream>

using namespace std;

int main()
{
   int c=0 , u=0;
   string S;
   cin>>S;
    if(S[0]=='A')
    {
     for(int i=2 ; i<S.size()-1; i++){
        if(S[i]=='C') c++;}

       if(c==1){
       for(int i =0 ; i<S.size(); i++){
       if ( S[i] >=65 && S[i] <=90)
       u++; }
       if(u==2)
       cout<<"AC \n";
       else 
       cout<<"WA \n ";
       

   }
          
    else 
    cout<<"WA \n" ;







    }
    else
    cout<<"WA \n ";



}