void main() {
    string s = readln.chomp;
    bool ok = true;
    if (s[0] != 'A') ok = false;
    if (s[2..$-1].count('C') != 1) ok = false;
    if (s.filter!isLower.to!string.length != s.length - 2) ok = false;
    writeln(ok ? "AC" : "WA");
}

import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.container;
import std.typecons;
import std.uni;