let s = read_line ()
let f g s = let n = ref 0 in String.iter (fun c -> if g c then incr n) s; !n
let _ = print_endline @@ if s.[0] = 'A' && String.(f ((=) 'C') @@ sub s 2 (length s - 3)) = 1 && f (fun c -> Char.uppercase c = c) s = 2 then "AC" else "WA"