program problemB
  implicit none


integer(8) :: n,K,l
character(len=128) :: S,rep

read(*,*) K
read(*,*) S

l=len_trim(S)

if (l<=K) then
  write(*,*) S
else
rep=S(1:K)
rep((K+1):(K+3))='...'
rep=trim(rep(1:(K+3)))
write(*,*) rep
end if
stop
end program
