const main = input => {
  const [[K], [S]] = input

  if (S.length <= Number(K)) return [[S]]

  return [[S.slice(0, K) + '...']]
}

const wrapper = data => {
  const input = data.split('\n').map(line => line.split(' '))
  const output = main(input)
  console.log(output.map(line => line.join(' ')).join('\n'))
}

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