#include <bits/stdc++.h>

using namespace std;

int main()
{
	string s;
	cin >> s;
	bool isValid = s[0] == 'A' 
		&& count_if(s.begin(), s.end(), [](char c) { return c >= 'A' && c <= 'Z';}) == 2
		&& any_of(s.begin()+2, s.end()-1, [](char c) { return c == 'C';});
	cout << (isValid ? "AC" : "WA") << endl;
	return 0;
}
