K = int(eval(input()))

S = str(eval(input()))

if len(S) <= K:

    print(S)

else:

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

K = int(eval(input()))

S = str(eval(input()))

if len(S) > K:

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

else:

    print(S)

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

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

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