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())

if len(S)<=K:

    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())
if len(S) <= K:
    print(S)
else:
    print((S[:K] + "..."))

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