#K input for the range of S

K = int(eval(input()))

#input of lowercase english letters

S = eval(input())

if len(S) > K:

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

else:

    print(S)
K=int(eval(input()))

S=eval(input())







if len(S) > K :

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



else:

    print(S)



# K input for the range of S
K = int(eval(input()))
# input of lowercase english letters
S = eval(input())
if len(S) > K:
    print((S[:K] + "..."))
else:
    print(S)

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

-# K input for the range of S -# input of lowercase english letters -    print((S[:K] + "...")) +    print((S[0:K] + "..."))