open Scanf
open Printf

let triple_dots k s =
  if String.length s <= k then s
  else String.sub s 0 k ^ "..."

let k,s = sscanf (read_line ()) "%d %s" (fun k  s -> (k,s))
let () = printf "%s\n" (triple_dots k s)