fun main() = Thread(null, ::abc168b, "", 128 * 1024 * 1024).start()

@OptIn(ExperimentalStdlibApi::class)
fun abc168b() {
    val k = readLine()!!.toInt()
    val s = readLine()!!

    val answer = if (s.length > k) s.take(k) + "..." else s

    println(answer)
}
