program ABC168B
    implicit none
    character(100)::S
    integer(8)::K,Slen
    read*,K,S
    Slen=len_trim(S)
    if(Slen<=K)print'(A)',S(1:Slen)
    if(Slen>K)print'(A,A)',S(1:K),"..."
end program ABC168B