function Main(input) {
  const rows = input.split('\n')
  const maxNum = parseInt(rows[0])
  const phrase = rows[1]
  const trimmedPhrase = phrase.length > maxNum ? phrase.slice(0, maxNum) + '...' : phrase
  
  console.log(trimmedPhrase)
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));