k = int(eval(input()))

s = eval(input())

if len(s) <= k:

  print(s)

else:

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

s = eval(input())

l = len(s)

if l<=k:

  print (s)

else : 

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

-if len(s) <= k: +l = len(s) +if l <= k: