main = do
    (a:s) <- getLine
    let p1 = a == 'A'
        p2 = (== 1) . length $ filter (== 'C') (init (tail s))
        p3 = (== length s - 1) . length $ filter (`elem` ['a'..'z']) $ filter (/= 'C') s
    putStrLn $ if p1 && p2 && p3 then "AC" else "WA"