import std.stdio, std.algorithm, std.string, std.ascii;

void main()
{
  char[] s = readln.strip.dup;
  if (s[0] != 'A') {
    writeln("WA");
    return;
  }

  auto p = s.indexOf('C');
  if (p == -1 || p <= 1 || p > s.length-2) {
    writeln("WA");
    return;
  }
  s[0] = 'a';
  s[p] = 'a';

  if (s.all!(isLower)) {
    writeln("AC");
  }
  else {
    writeln("WA");
  }


}
