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

void main() {
    auto S = readln.chomp.dup;

    bool po() {
        if (S[0] != 'A') return false;
        if (S[2..$-1].count('C') != 1) return false;
        foreach (i; 2..S.length-1) {
            if (S[i] == 'C') S[i] = 'c';
        }
        return S[1..$].toLower == S[1..$];
    }
    writeln(po() ? "AC" : "WA");
}

