S=io.read()
s=string.lower(S)

if S:sub(1,1)=="A" then
    Counter=0
    for i=2, #S do
        if S:sub(i,i)=="C" and 3<=i and i<=#S-1 then
            Counter=Counter+1
        end
    end
    if Counter==1 then
        checker=0
        for i=1, #S do
            if S:sub(i,i)~=s:sub(i,i) then
                checker=checker+1
            end
        end
        if checker==2 then
            print("AC")
            return
        end
    end
end
print("WA")