import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

sys.setrecursionlimit(10 ** 7)



k = int(readline())

s = readline().rstrip().decode()

if len(s) <= k:

    print(s)

else:

    print((s[:k] + '...'))

import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

sys.setrecursionlimit(10 ** 7)



k = int(readline())

s = read().rstrip().decode()

if len(s) <= k:

    print(s)

else:

    print((s[:k] + '...'))

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**7)
k = int(readline())
s = readline().rstrip().decode()
if len(s) <= k:
    print(s)
else:
    print((s[:k] + "..."))

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**7)
k = int(readline())
s = read().rstrip().decode()
if len(s) <= k:
    print(s)
else:
    print((s[:k] + "..."))

-s = readline().rstrip().decode() +s = read().rstrip().decode()