process.stdin.resume();
process.stdin.setEncoding("utf8");
process.stdin.on("data", input => {
  const inputArr = input.split("\n");
  const K = inputArr[0];
  const S = inputArr[1];
  const result = getResult(K, S);
  console.log(result);
});

const getResult = (K, S) => {
  if (S.length <= K) {
    return S;
  }
  return S.slice(0, K) +  '...';
};
