program triple_dots

 implicit none
 integer::k,length
 character::s*103

 read*,k,s
 length=len_trim(s)

 if(length<=k) print*,s
 if(length>k) then
   s=s(1:k)//'...'
   print*,s
 end if

end program triple_dots