#include <bits/stdc++.h>
using namespace std;
int main(void) {
    string s;
    cin >> s;
    smatch mat;
    if (regex_search(s, mat, regex("^A[a-z]+C[a-z]+$"))) {
        cout << "AC\n";
    } else {
        cout << "WA\n";
    }
    return 0;
}
