program main
  implicit none
  integer :: k
  character(100) :: s
  read *, k
  read *, s
  if (len_trim(s) > k) then
    print "(a,a)", s(1:k), "..."
  else
    print "(a)", trim(s)
  end if
end program main
