K = int(eval(input()))

S = eval(input())



if len(S)<=K:

  print(S)

else:

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

S = eval(input())

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

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

-if len(S) <= K: -    print(S) -else: -    print((S[:K] + "...")) +print((S[:K] + (K < len(S)) * "..."))