#include <iostream>
#include <string>

using namespace std;

int main(){
	string S;
	cin >> S;
	int len = S.size();
	string ans = "AC";
	if (S[0] != 'A')
		ans = "WA";
	int count = 0;
	for (int i = 1; i < len; i++) {
		if (isupper(S[i])) {
			if (i == 1 or i == (len - 1) or S[i] != 'C') {
				ans = "WA";
			}
			count++;
		}
	}
	if (count != 1)
		ans = "WA";
	cout << ans << endl;
}