k = int(eval(input()))

s = eval(input())



if len(s) <= k:

    print(s)

else:

    print(("{}...".format(s[:k])))
k = int(eval(input()))

s = eval(input())

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

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

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