defmodule Main do
  def main do
    [h, _] =
      IO.gets("")
      |> String.trim()
      |> String.split()
      |> Enum.map(&String.to_integer/1)
      
    IO.stream(:stdio, :line)
    |> Enum.take(h)
    |> Enum.map(&String.trim/1)
    |> Enum.each(fn elem ->
      IO.puts(elem)
      IO.puts(elem)
    end)
  end
end
