open Batteries

let () = 
        Scanf.sscanf (read_line ()) "%d" (
        fun k -> 
                let str = read_line () in
                        if (String.length str) <= k then
                                str
                        else
                                (String.sub str 0 k) ^ "..."
        ) |> Printf.printf "%s\n"
