#include <bits/stdc++.h>
using namespace std;
int main() {
    string S;
    cin >> S;
    int N = S.size();
    
    string ans = "AC";
    int C = 0;
    int capital = 0;
    for(int i = 0; i < N; i++) {
        if(2<=i && i<=N-2 && S.at(i)=='C') C++;
        if(S.at(i)<97) capital++;
    }
    if(S.at(0)!='A' || C!=1 || capital!=2) ans = "WA";
    cout << ans << endl;
}
