k = int(eval(input()))

s = eval(input())

a = list(s.split())

if len(s) <= k:

  print(s)

elif len(s) > k:

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

s = eval(input())

if len(s) <= k:

  print(s)

elif len(s) > k:

  print((s[0:k] + '...'))
k = int(eval(input()))
s = eval(input())
a = list(s.split())
if len(s) <= k:
    print(s)
elif len(s) > k:
    print((s[0:k] + "..."))

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

-a = list(s.split())