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

int main(){
  string S;
  cin >> S;
  int capital = 0;
  for(int i = 0; i < S.size(); i++){
    if(S[i] >= 'A' && S[i] <= 'Z') capital++;
  }
  int C = 0;
  for(int i = 2; i < S.size() - 1; i++){
    if(S[i] == 'C') C++;
  }
  if(S[0] == 'A' && capital == 2 && C == 1) cout << "AC" << endl;
  else cout << "WA" << endl;
  return 0;
}
