process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = []
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});

reader.on('line', (line) => {
  lines.push(line);
});

reader.on('close', () => {
 var k = Number(lines[0]);
 var s = lines[1].split('');
 var len = s.length;

 if(len > k){
   s = s.slice(0,k);
   console.log(s.join('') + '...');
 }else{
   console.log(s.join(''));
 }
});