#include <bits/stdc++.h>
using namespace std;

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