s = io.read()
n = #s
c = 0
r = s:sub(1, 1) == "A"
for i = 3, n - 1 do
  if s:sub(i, i) == "C" then
    c = c + 1
  end
end
if c ~= 1 then r = false end
for i = 2, n do
  ss = s:sub(i, i)
  if ss:byte() < 96 and ss ~= "C" then
    r = false
  end
end
print(r and "AC" or "WA")
