function Main(input) {
	const setting = input.trim().split('\n')
  const str_max_len = setting[0] - 0
  const str = setting[1].split('')

  if (str.length <= str_max_len) {
    console.log(setting[1])
  } else {
    str.splice(str_max_len, str.length, '...')
    console.log(str.join(''))
  }
    }

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