#include <bits/stdc++.h>
using namespace std;
int i;
bool a = 0;
bool b = 1;
int isupper(int);
int main() {
  string S;
  cin >> S;
  size_t size = S.length();
  for (i = 0; i < size; i++) {
    if (isupper(S[i]) != 'A' && isupper(S[i] != 'C')) b = 0;
  }
  size--;
  while (S[0] == 'A' && b == 1) {
    for (i = 2; i < size; i++) {
      if (S[i] == 'C') {
        a = !a;
        break;
      }
    }
    i++;
    for (i; i < size; i++) {
      if (S[i] == 'C') {
        a = !a;
        break;
      }
    }
    break;
  }
  if (a == 1)
    cout << "AC" << endl;
  else
    cout << "WA" << endl;
  return 0;
}
