k = int(eval(input()))

s = str(eval(input()))



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

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

-s = str(eval(input())) +s = eval(input())