import sys

K = int(input())

S = input()



print(S) if len(S) <= K else print(S[:K]+"...")

K=int(eval(input()))

S=eval(input())

 

if len(S)<=K:

    print(S)

else:

    print((S[:K]+'...'))
import sys

K = int(input())
S = input()
print(S) if len(S) <= K else print(S[:K] + "...")

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

-import sys - -K = int(input()) -S = input() -print(S) if len(S) <= K else print(S[:K] + "...") +K = int(eval(input())) +S = eval(input()) +if len(S) <= K: +    print(S) +else: +    print((S[:K] + "..."))