"use strict";

const main = (arg) => {
  const array = arg.trim().split("\n");
  let K = parseInt(array[0]);
  let S = array[1];

  if (S.length < K) {
    console.log(S);
  } else {
    let result = S.substr(0, K);
    console.log(result + "...");
  }
};
main(require("fs").readFileSync("/dev/stdin", "utf8"));
// main("40\nferelibenterhominesidquodvoluntcredunt");
// https://atcoder.jp/contests/abc168/tasks/abc168_b
