program main
	implicit none
    character(100)::s
    integer::k
    read(*,*)k
    read(*,*)s
    if(len_trim(s)>k)then
    	write(*,*)s(1:k)//'...'
    else
    	write(*,*) s(1:len_trim(s))
    end if
    stop
end program main