fun main(args: Array<String>) {
  val input1 = readLine()!!.toInt()
  val input2 = readLine()!!
  var result = ""
  result = if (input2.length <= input1) {
    input2
  } else {
    input2.substring(0, input1).plus("...")
  }
  println(result)
}
