K = int(input())

S = input()

for i ,s in enumerate(S):

  if i == K:

    print('...')

    break

  print(s, end='')

K = int(eval(input()))

S = eval(input())

if len(S) <= K:

  print(S)

else:

  print((S[:K] + "..."))

K = int(input())
S = input()
for i, s in enumerate(S):
    if i == K:
        print("...")
        break
    print(s, end="")

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

-K = int(input()) -S = input() -for i, s in enumerate(S): -    if i == K: -        print("...") -        break -    print(s, end="") +K = int(eval(input())) +S = eval(input()) +if len(S) <= K: +    print(S) +else: +    print((S[:K] + "..."))