defmodule Main do def main do IO.read(:line) |> String.trim() |> solve |> IO.puts() end defp solve(s) do cond do String.slice(s, -2..-1) == "ai" -> String.slice(s, 0..-3) <> "AI" true -> s <> "-AI" end end end