defmodule Main do
  def main do
    n = IO.gets("") |> String.trim() |> String.to_integer()
    s = IO.gets("") |> String.trim()

    if String.length(s) <= n do
      IO.puts(s)
    else
      target = String.slice(s, 0..(n - 1))
      IO.puts(target <> "...")
    end
  end
end