import std.stdio;
import std.string;
import std.conv;
import std.algorithm;

void main() {
  string s = readln.chomp;

  if (s[0] != 'A') {
    writeln("WA");
    return;
  }
  if (s[2..$-1].count('C') != 1) {
    writeln("WA");
    return;
  }
  
  string po = s.toLower;
  for (int i = 0; i < s.length; i++) {
    if ((s[i] != 'A' && s[i] != 'C') && s[i] != po[i]) {
      writeln("WA");
      return;
    }
  }

  writeln("AC");
}
