let s = read_line ()
let n = String.length s
let cs = Array.init n @@ fun i -> if Char.uppercase s.[i] = s.[i] then 1 else 0
let _ = print_endline @@ if s.[0] = 'A' && String.contains (String.sub s 2 (n - 3)) 'C' && Array.fold_left (+) 0 cs = 2 then "AC" else "WA"