#include <iostream>

using namespace std;

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





