if let input_line = readLine(), let number = Int(input_line), let str = readLine() {
  
  if number >= str.count {
    print(str)
  } else {
    var start = str.startIndex
    start = str.index(start, offsetBy: 1)
    let end = str.index(start, offsetBy: number)
    print(str[start..<end] + "...")
  }
}
