K=int(eval(input()))

S=eval(input())

if len(S)<K or len(S)==K:

    print (S)

elif len(S)>K:

    print((S[0:K]+"...")) 
k=int(eval(input()))

s=eval(input())

characters=len(s)

empty=""

if characters<=k:

    print(s)

else:

   i=0

   while i<=k-1:

       empty+=s[i]

       i=i+1

   print(f"{empty}...")
K = int(eval(input()))
S = eval(input())
if len(S) < K or len(S) == K:
    print(S)
elif len(S) > K:
    print((S[0:K] + "..."))

k = int(eval(input()))
s = eval(input())
characters = len(s)
empty = ""
if characters <= k:
    print(s)
else:
    i = 0
    while i <= k - 1:
        empty += s[i]
        i = i + 1
    print(f"{empty}...")

-K = int(eval(input())) -S = eval(input()) -if len(S) < K or len(S) == K: -    print(S) -elif len(S) > K: -    print((S[0:K] + "...")) +k = int(eval(input())) +s = eval(input()) +characters = len(s) +empty = "" +if characters <= k: +    print(s) +else: +    i = 0 +    while i <= k - 1: +        empty += s[i] +        i = i + 1 +    print(f"{empty}...")