#include<iostream>
#include<algorithm>
using namespace std;

int main(){
    string s;cin>>s;
    string ans="AC";
    
    if(s[0]!='A') ans="WA";

    int count=0;
    for(int i=1;i<s.size();i++)if(isupper(s[i])){
        if(i==1||i==s.size()-1||s[i]!='C') ans="WA";
        if(s[i]=='C') count++;
    }

    if(count!=1) ans="WA";

    cout<<ans<<endl;
}