program main
integer :: k
character*100 ::s,b
character*3 :: a = '...'
read(*,*)k
read(*,*)s
if (len_trim(s) <= k) then
write(*,*) s
else
do i = (len_trim(s) - k),len_trim(s)
s(i:i) = ' '
end do
b = trim(s) // a
write(*,*)b
end if
end program