S=io.read()
res="AC"
if string.sub(S,1,1)~="A" then
  res="WA"
end
if string.sub(S,3,3)~="C" then
  res="WA"
end
if string.sub(S,2,2)<"a" or string.sub(S,2,2)>"z" then
  res="WA"
end
for i=4,#S do
  if string.sub(S,i,i)<"a" or string.sub(S,i,i)>"z" then
    res="WA"
  end
end
print(res)