func main() {
    let k = Int(readLine()!)!
    let s = readLine()!
    
    if s.count <= k {
        print(s)
    } else {
        print(s[s.startIndex...s.index(s.startIndex, offsetBy: k - 1)] + "...")
    }
}

main()
