import sys

input = sys.stdin.readline

k = int(eval(input()))

s = list(input().rstrip())

n = len(s)



if n <= k:

    print(("".join(s)))

else:

    ans = "".join(s[:k]) + "..."

    print(ans)
import sys

input = sys.stdin.readline



k = int(eval(input()))

s = input().rstrip()

ans = s if len(s) <= k else s[:k] + "..."

print(ans)
import sys

input = sys.stdin.readline
k = int(eval(input()))
s = list(input().rstrip())
n = len(s)
if n <= k:
    print(("".join(s)))
else:
    ans = "".join(s[:k]) + "..."
    print(ans)

import sys

input = sys.stdin.readline
k = int(eval(input()))
s = input().rstrip()
ans = s if len(s) <= k else s[:k] + "..."
print(ans)

-s = list(input().rstrip()) -n = len(s) -if n <= k: -    print(("".join(s))) -else: -    ans = "".join(s[:k]) + "..." -    print(ans) +s = input().rstrip() +ans = s if len(s) <= k else s[:k] + "..." +print(ans)