#include <iostream>

using namespace std;

int main()
{
    string s;cin>>s;
    int x=0,y=0;
    int n=s.length();
        for(int i=0;i<n;i++){
                if(isupper(s[i])){
                x++;}}
          for(int i=2;i<n-1;i++){
            if(s[i]=='C')
                y=1;
          }
         if(s[0]=='A'&&x==1&&y==1)
            cout<<"AC";
        else
            cout<<"WA";
}





