let s = read_line ()
let n = String.length s
let g i = let is_ok = ref true in
  for j = 1 to n - 1 do
    if i <> j then if Char.lowercase s.[j] <> s.[j] then is_ok := false done;
  !is_ok
let f s = try let i = String.index s 'C' in g @@ i + 2 with _ -> false
let _ = print_endline @@ if s.[0] = 'A' && f @@ String.sub s 2 @@ n - 3 then "AC" else "WA"