function main(input) {
  const args = input.split('\n');
  const K = parseInt(args[0], 10);
  const S = args[1];

  if (K >= S.length)
    console.log(S);
  else
    console.log(S.slice(0, K) + '...');
}

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