k = int(eval(input()))

s = eval(input())

if len(s) <= k:

    print(s)

else:

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

s = input()

if len(s) <= k:

    print(s)

else:

    S = s[:k]

    print(S, end="")

    print("...")

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

k = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    S = s[:k]
    print(S, end="")
    print("...")

-k = int(eval(input())) -s = eval(input()) +k = int(input()) +s = input() -    print((s[0:k] + "...")) +    S = s[:k] +    print(S, end="") +    print("...")