#include<iostream>
#include<string>
#include<regex>
using namespace std;

int main() {
  string S;
  cin >> S;
  regex re("A[a-z]+C[a-z]+$");
  smatch m;

  if(regex_search(S, m, re)) {
    cout << "AC" << endl;
  } else {
    cout << "WA" << endl;
  }

  return 0;
}
