fun main(args: Array<String>) {
val num:Int? = readLine()?.toInt()
val string:String?=readLine()

if(num==null||string==null){
return
}

if(string.length<=num){
println(string)
}else{
val stringV=string.substring(0, num)
println("${stringV}...")
}
}