import Data.List;f x=if(x!!0)=='A'&&((length.elemIndices 'C')(((drop 2).(take(length x-1)))x))==1 && length[k|k<-x,k/='A',k/='C',k>='a',k<='z'] == ((length x)-2)then"AC"else"WA";main=getLine>>=putStrLn.f