'use strict'
function main(inp) {
  inp = inp.trim().split('\n');
  const N = inp.shift();
  let ans = inp[0];
  let txt;
  if(ans.length > N){
    console.log(ans.substr(0,N) + "...");
  }else {
    console.log(ans);
  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
