l1 :: String -> Bool
l1 ('A':xs) = True
l1 _ = False

l2 :: String -> Bool
l2 (_:_:xs) = length (filter ('C'==) a) == 1
    where
        a = (tail. reverse) xs

l3 :: String -> Bool
l3 = all (`elem` ['a'..'z']) . filter (not . flip elem ['A', 'C'])

main = do
    x <- getLine
    putStrLn $ if l1 x && l2 x && l3 x  then "AC" else "WA"
