k = int(eval(input()))

s = eval(input())

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

s = eval(input())

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

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

-print((s if len(s) <= k else s[0:k:] + "...")) +print((s if len(s) <= k else s[:k:] + "..."))