import std.stdio, std.string, std.range, std.conv, std.array, std.algorithm, std.math, std.typecons, std.functional;

void main() {
    const S = readln.chomp;
    writeln(S[0] == 'A' && S[2..$-2].count('C') == 1 && S[1] == S[1].toLower && S[2..$-2].filter!(c => c != 'C').array.pipe!(s => s.toLower == s) && S[$-2..$].pipe!(s => s.toLower == s) ? "AC" : "WA");
}

