k = int(eval(input()))

s = eval(input())

if len(s) <= k:

    print(s)

else:

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

s = eval(input())

if len(s) > k:

    s = s[:k] + '...'

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

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

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