program main
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int32):: k
    character(100):: s

    read*, k
    read*, s

    if (len_trim(s) <= k) then
        print'(a)', s
    else
        print'(a)', s(1:k) // '...'
    end if
end program main