#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int l = s.size();
string ans = "AC";

if(s[0] != 'A'){
  ans = "WA";
}
int count = 0;

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

if(count != 1){
  ans = "WA";
}
cout<< ans <<endl;

}