"use strict";

function main(input) {
  input = input.trim().split("\n");
  const K = parseInt(input[0]);
  const S = input[1].length;
  if (S <= K) {
    console.log(input[1]);
    return;
  }
  const res = input[1].slice(0, K);
  console.log(res + "...");
}

main(require("fs").readFileSync("/dev/stdin", "utf-8"));
