local str = io.read("*l")
local len = string.len(str)
local first = string.sub(str,1,1)
if first ~= 'A' then
	print("WA")
	return
end
local mid = string.sub(str,3,len-1)
local c = string.find(mid,"C")
if not c then
	print("WA")
	return
end
local rem1 = string.sub(str,2,c-1)
local rem2 = string.sub(str,c+1,len)
if string.match(rem1,%u) or string.match(rem2,%u) then
	print("WA")
	return
end
print("AC")