let count f s = Array.init (String.length s) (fun i -> if f s.[i] then 1 else 0) |> Array.fold_left (+) 0
let () = Scanf.scanf "%s" @@ fun s ->
  print_endline @@ if
    s.[0] = 'A' &&
    1 = count ((=) 'C') (String.sub s 2 (String.length s - 3)) &&
    2 = count (fun x -> 'A' <= x && x <= 'Z') s
  then "AC" else "WA"