const processData = (lines) => {
  const k = +lines[0]
  const s = lines[1]
  if (s.length > k) {
    console.log(s.slice(0, k) + '...')
  } else {
    console.log(s)
  }
}

let i = ''
process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {
  const {EOL} = require('os')
  const lines = i.split(EOL) /*your input text, split by lines*/
  processData(lines)
})
