K = int(eval(input()))

S = eval(input())



if len(S) <= K:

    print(S)

    

elif len(S) >= K:

    print((S[:K] + '...'))
k = int(eval(input()))

s = eval(input())



if len(s) <= k:

    print(s)

else:

    print((s[:k] + '...'))
K = int(eval(input()))
S = eval(input())
if len(S) <= K:
    print(S)
elif len(S) >= K:
    print((S[:K] + "..."))

k = int(eval(input()))
s = eval(input())
if len(s) <= k:
    print(s)
else:
    print((s[:k] + "..."))

-K = int(eval(input())) -S = eval(input()) -if len(S) <= K: -    print(S) -elif len(S) >= K: -    print((S[:K] + "...")) +k = int(eval(input())) +s = eval(input()) +if len(s) <= k: +    print(s) +else: +    print((s[:k] + "..."))