K = int(eval(input()))

S = eval(input())



if len(S) > K:

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

else:

  print(S)

  
K = int(eval(input()))

S = eval(input())



print((S[:K] + '...' if len(S) > K else S))

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

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

-if len(S) > K: -    print((S[:K] + "...")) -else: -    print(S) +print((S[:K] + "..." if len(S) > K else S))