k = int(eval(input()))

s = eval(input())

lens = len(s)

if lens > k:

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

else:

	print(s)
k=int(eval(input()));s=eval(input());l=len(s)

print((s[0:min(k,l)]+"."*3*(k<l)))
k = int(eval(input()))
s = eval(input())
lens = len(s)
if lens > k:
    print((s[0:k] + "..."))
else:
    print(s)

k = int(eval(input()))
s = eval(input())
l = len(s)
print((s[0 : min(k, l)] + "." * 3 * (k < l)))

-lens = len(s) -if lens > k: -    print((s[0:k] + "...")) -else: -    print(s) +l = len(s) +print((s[0 : min(k, l)] + "." * 3 * (k < l)))