#include<iostream>
#include<string>
using namespace std;
int main(){
  string s;cin >> s;int n = s.size(),cc = 0,i;bool ok = true;
  for(i=0;i<n;i++){
    if(i==0 && s[i] != 'A') ok = false;
    if(i>=2 && i<=n-2 && s[i] == 'C') cc++;
    if((i==1 || i==n-1) && !('a' <= s[i] && s[i] <= 'z')) ok = false;
  }
  cout << ((ok && cc==1) ? "AC":"WA") << endl;
}