defmodule Main do
  def main do
      s =
      IO.read(:line)
      |> String.trim
      subs = String.slice(s, 2..-2)
      s = String.to_charlist(s)
      subs = String.to_charlist(subs)
      ans = "AC"
      ans = if List.first(s) != ?A do
      	"WA"
      else
        "AC"
      end
      sz = s |> length
      ans = if s |> Enum.filter(fn(x) -> x >= ?a and x <= ?z end) |> length != sz - 2 do
      	"WA"
        else
        "AC"
      end
      ans = if Enum.count(subs, fn x -> x == ?C end) != 1 do
        "WA"
        else
        "AC"
      end
      IO.puts(ans)
      
  end
end
