K = int(eval(input()))

S = eval(input())



S_num = len(S)



if K >= S_num:

    print(S)

else:

    print((S[:K] + "..."))

K = int(eval(input()))

S = eval(input())



if len(S) <= K:

    print(S)

else:

    print((S[0:K] + '...'))

K = int(eval(input()))
S = eval(input())
S_num = len(S)
if K >= S_num:
    print(S)
else:
    print((S[:K] + "..."))

K = int(eval(input()))
S = eval(input())
if len(S) <= K:
    print(S)
else:
    print((S[0:K] + "..."))

-S_num = len(S) -if K >= S_num: +if len(S) <= K: -    print((S[:K] + "...")) +    print((S[0:K] + "..."))