peterverebics/CodeNet_Python_118 huggingface dataset:
k = int(input())
s = str(input())
if len(s) <= k:
    print(s)
else:
    print(s[0:k] + '...')
K = int(input())
S = input()

if len(S) > K:
    print(S[:K] + '...')
else:
    print(S)
N = int(input())
S = input()

#print(N)
#print(S)

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

if K>=len(S):
  print(S)
else:
  print(S[0:K]+str("..."))
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    print(S[:K]+"...")
k = int(input())
s = str(input())
if k < len(s):
    print(s[:k] + "...")
else:
    print(s[:k])
k = (int)(input())
s=input()
if len(s)>k:
    print(s[:k]+'...')
else:
    print(s)
k = int(input())
s = input()

if len(s) <= k:
    print(s)
else:
    print(s[:k]+"...")
K = int(input())
S = input()
print(S if len(S) <= K else S[0:K:1] + '...')
K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  print(S[0:K] + '...')
#!python3

iim = lambda: map(int, input().rstrip().split())

def resolve():
    K = int(input())
    S = input()

    if len(S) > K:
        S = S[:K] + "..."

    print(S)

if __name__ == "__main__":
    resolve()
K = input()
S = input()

if len(S) <= int(K):
    print(S)
else:
    print(S[:int(K)] + "...")
a = int(input())
s = input()
if(len(s) > a):
    print(s[:a] +"...")
else:
    print(s)
def main():
    K = int(input())
    S = str(input())

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

if __name__ == "__main__":
    main()
break_line = int(input())
word = input()

if len(word) <= break_line:
    print(word)
else:
    print('{}...'.format(word[:break_line]))
num = int(input())
s = input()

if len(s) <= num:
    print(s)
else:
    print(s[:num] + '...')
k = int(input())
s = input()
print(s if len(s) <= k else s[:k] + "...")
k = int(input())
s = input()

if len(s) > k:
    print(s[:k] + "...")
else:
    print(s)
from sys import stdin

K = int(stdin.readline().rstrip())
S = stdin.readline().rstrip()


if len(S) <= K:
    print(S)
else :
    print(S[:K]+"...")
K = int(input())
S = input()
if len(S) > K:
    S = S[:K] + '...'
print(S)
import numpy as np
k = int(input())
s = input()
if len(s) <= k:
  print(s)
else:
  print("{}...".format(s[:k]))
k = int(input())
s = input()

if len(s) <= k:
  print(s)
else:
  print(s[0:k]+"...")
K = int(input())
S = input()

Sl = list(S)

if len(Sl) <= K:
    print(S)
else:
    Po = "".join(Sl[0:K])
    print(Po+'...')
k = int(input())
s = input()

if(len(s) <= k):
    print(s)
else:
    for i in range(k):
        print(s[i],end="")
    print("...")
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    str = S[:K]+'...'
    print(str)
def main():
    k = int(input())
    s = input()
    s_len = len(s)
    
    if s_len <= k:
        print(s)
    else:
        s = s[0:k] + '...'
        print(s)
    
main()
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    print(S[:K]+'...')
# https://atcoder.jp/contests/abc168/tasks/abc168_b

K = int(input())
S = input()

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

else:
    print(S[0: K] + '...')
# ABC168
# B (Triple Dots)
K = int(input())
S = input()
a = len(S)
if a <= K:
    print(S)
else:
    print(str(S[0:K])+'...')
K=int(input())
S=input()
if len(S)<=K:
  print(S)
else:
  print(S[:K]+"...")
#B
K = int(input())
S = str(input())

L = len(S)
if L <= K:
    print(S)
else:
    ans = ""
    for i in range(K):
        ans+=S[i]
    ans+="..."
    print(ans)
k = int(input())
s = input()

if len(s) > k:
    s = s[:k] + '...'

print(s)
k = int(input())
s = str(input())

if len(s) <= k:
    print(s)
else:
    print(s[0:k] + '...')
def resolve():
    K = int(input())
    S = input()

    if K >= len(S):
        print(S)
        return

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


resolve()
k=int(input())
s=input()
if len(s)<=k :
    print(s)
if len(s)>k :
    for i in range (0,k) :
        print(s[i],end='')
    print("...")
# ABC168

K = int(input())
S = input()

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

if len(s)<=k:
    print(s)
elif len(s)>k:
    print(s[0:k]+'...')
k=int(input())
s=input()
if len(s) > k:
    for i in range(k):
        print(s[i],end='')
    print('...')
else:
    print(s)
K = int(input())
S = input()

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

if len(S) > K:
    print(S[:K] + "...")
else:
    print(S)
K = int(input())
S = input()
if len(S) > K:
    print(S[:K]+"...")
else:
    print(S)
K = int(input())
S = input()
if K >= len(S):
    print(S)
else:
    print(S[:K]+"...")
def main():
  k = int(input())
  s = input()
  if len(s) > k:
    print(s[:k]+str('...'))
  else:
    print(s)
 
    
    
if __name__ == '__main__':
  main()
k = int(input())
s = input()
if len(s) <= k:
  print(s)
else:
  print(s[:k] + "...")
k = int(input())
s =input()
if len(s)<= k:
    print(s)
else:
    printing = s[:k]+"..."
    print(printing)
K=int(input())
S=input()
if len(S)>K:
  print(S[:K]+"...")
else:
  print(S)
K = int(input())
S = input()

if len(S) > K:
    S_short = S[:K]
    print("{}...".format(S_short))
else:
    print(S)
def main():
  k = int(input())
  s = input()
  
  if len(s) <= k:
    print(s)
  else:
    print(s[:k] + '...')
  
  
if __name__ == '__main__':
  main()
K=int(input())
S=input()
if len(S)>K:
    print(S[:K]+'...')
else:
    print(S)
K = int(input())
S = input()

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

if(int(C)<=int(K)):
  print(S)
else:
  print((S[:int(K)])+"...")
K = int(input())
S = str(input())
if len(S) <= K:
    print(S[:K])
elif len(S) > K:
    print(S[:K] + ("." * 3))
K=int(input())
S=input()
if len(S) <= K:
  print(S)
else:
  print(S[:K]+"...")
K = int(input())
S = str(input())
if K >= len(S):
    print (S)
else:
    print (S[0:K]+ "...")
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    a = len(S) - K
    print(S[:-a]+'...')
k=int(input())
s=input()
a=""
if k<len(s):
    a+=s[0:k]
    a+="..."
    print(a)
else:
    print(s)
from sys import stdin

k = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()

if len(s) <= k:
  print(s)
else:
  print(s[:k] + '...')
k = int(input())
S = input().strip()
if len(S) <= k:
    print(S)
else:
    print(S[:k] + '...')
K = int(input())
S = input()

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

if K >= len(S):
    print(S)
else:
    print(S[:K] + '...')
K, S = [input() for i in range(2)]

if len(S)<=int(K):
  print(S)
else:
  print(S[:int(K)]+'...')
import math
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    k=INT()
    s=STR()
    ls=len(s)
    if ls<=k:
        print(s)
    else:
        print(s[0:k]+'...')
if __name__ == '__main__':
    do()
k=int(input())
s=input()
if len(s)<=k:
    ans=s
else:
    ans=s[:k]+'...'
print(ans)
N = int(input())
S = str(input())
if N < len(S):
    S = S[:N]+'...'
print(S)
k = int(input())
s = input()
if len(s)<=k:
  print(s)
else:
  print(s[:k]+"...")
# -*- coding: utf-8 -*-
# 整数の入力
length = int(input())

# 文字列の入力
string = input()

if len(string) > length:
    print(string[:length] + "...")
else:
    print(string)
k = int(input())

s = input()
if(len(s)<=k):
	print(s)
else:
	print(s[0:k]+"...")
K = int(input())
S = input()

if K >= len(S):
    print(S)
else:
    print(S[0:K] + '...')
k = int(input())
s = input()
if len(s) <= k:print(s)
else:print(s[:k]+"...")
K=int(input())
S=str(input())
s=len(S)
if s<=K:
    print(S)
else:
    S=S[0:K]
    S+='...'
    print(S)
k = int(input())
s = input()
if len(s) > k:
    print(s[:k] + '...')
else:
    print(s)
k = int(input())
s = input()

if(len(s) <= k):
    print(s)
else:
    ans = s[:k]+"..."
    print(ans)
k=int(input())
s=input()
if len(s)>k:
    t=s[:k]+str('...')
    print(t)
else:
    print(s)
k = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    print(s[0:k]+'...')
def main():
    k = int(input())
    s = str(input())

    output = ''
    if len(s) > k:
        for i in range(k):
            output += s[i]
        output += '...'
    else:
        output = s

    print(output)


if __name__ == '__main__':
    main()
from sys import stdin
from collections import defaultdict as dd
from collections import deque as dq
import itertools as it
from math import sqrt, log, log2
from fractions import Fraction

# t = int(stdin.readline())
# for _ in range(t):
# n, m = map(int, stdin.readline().split())
# nums = list(map(int, stdin.readline().split()))
# n = int(input())
# if n%10 in [2, 4, 5, 7, 9]:
#     print('hon')
# elif n%10 in [0, 1, 6, 8]:
#     print('pon')
# else:
#     print('bon')

k = int(input())
s = input()

ans = s[:k] + ('...' if len(s) > k else '')
print(ans)
K = int(input())
S = str(input())

def Main(K, S):
    if len(S) <= K:
        return S
    else:
        return S[:K] + '...'
        
res = Main(K, S)
print(res)
K = int(input())
S = str(input())
S_ = list(S)
S_kari = ''

if K >= len(S_):
  print(S)
else:
  for i in range(K):
    S_kari += S_[i]
  S_kari += '...'
  print(S_kari)
K=int(input())
S=input()
if len(S)<=K:
  print(S)
else:
  print(S[:K]+'...')
K = int(input())
S = list(input())
S1 = []
L = len(S)

if(K >= L):
    print(''.join(S))
else :
    S.insert(K,'.')
    S.insert(K+1,'.')
    S.insert(K+2,'.')
    print(''.join(S[0:K+3]))
K = int(input())
S = input()

if len(S) > K:
    print(S[:K], "...", sep='')
else:
    print(S)
K = int(input())
S = list(input())
if len(S) <= K:
    print(("").join(S))
else:
    print("".join(S[:K])+"...")
k=int(input())
s=input()
if len(s) > k:
  print(s[:k]+"...")
else:
  print(s)
K = int(input())
S = input()
N = len(S)

if N > K:
    print(S[:K]+"...")
else:
    print(S)
fig = int(input())
moji = input()
if fig >= len(moji):
  print(moji)
else:
  print(moji[0:fig] + "...")
K=int(input())
S=input()
if len(S)>K:
  print(S[:K]+'...')
else:
  print(S)
K = int(input())
S = input()
# N, K = map(int, input().split())
# A = list(map(int, input().split()))
if len(S) <= K:
    print(S)
else:
    print(S[:K] + "...")
K = int(input())
S = input()
ans =[]
for i,x in enumerate(S):
    if i >= K:
        ans.append("...")
        break
    ans.append(x)
ans = "".join(ans)
print(ans)
a=int(input())
b=input()
m=len(b)
if m<=a :
  print(b)
else :
  s=b[:a]+'...'

  print(s)
n = int(input())
s = input()
if len(s)<=n:
  print(s)
else:
  print(s[:n]+'...')
k = int(input())
s = input()

if len(s) <= k: # Sの長さがKまで。K:＝Kまで。
     print(s)
else:
    s = s[:k]
    s = s+"..."
    print(s)
k = int(input())
s = input()
if len(s)<=k:
    print (s)
else:
    print (s[:k] + '...')
K = int(input())
S = input()
print(S) if len(S) <=  K else print(S[:K]+'...')
K = int(input())
S = list(input())

if len(S) <= K:
    print("".join(S))
else:
    tmp = [S[i] for i in range(K)]
    print("".join(tmp) + "...")
if __name__ == "__main__":
    k = int(input())
    s = input()

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

if len(S) <= K:
    print(S)
else:
    print(S[0 : K] + '...')
K=int(input())
S=list(map(str,input()))
if len(S)<=K:
  print("".join(map(str,S)))
else:
  print("".join(S[0:K])+"...")
K=int(input())
S=list(input())

if K<len(S):
    del S[K:len(S)]
    S.append('...')
print(''.join(S))
K = int(input())
S = input()

if len(S) <= K:
    print(S)
elif len(S) > K:
    print(S[:K]+'...')
import sys
from collections import defaultdict,Counter

sys.setrecursionlimit(10**7)
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

def main():
    k=ii()
    s=input()
    print(s if len(s)<=k else s[:k]+"...")
    


if __name__ == "__main__":
    main()
k=int(input())
s=input()
if len(s)<=k:
    print(s)
else:
    print(s[:k]+'...')
K=int(input())
S=input()
if len(S)<=K:
  print(S)
else:
  N=S[:K:1]
  print(N+"...")
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    print(S[0:K] + "...")
K = int(input())
S = input()
s = len(S)
if K >= s:
    print(S)
else:
    for i in range(0,K):
        print(S[i], end="")
    print("...")
k = int(input())
S = input()

if len(S) <= k:
    print(S)
else:
    print(S[:k] + "...")
k = int(input())
s = input()
t = len(s)
if k >= t:
    print(s)
else:
    print(s[0:k] + "...")
K = int(input())
S = str(input())
l = len(S)

if l<=K:
    print(S)
else:
    print(S[:K]+'...')
K = int(input())
S = input()

len_s = len(S)

if len_s <= K:
  print(S)
else:
  print(S[:K] + "...")
k = int(input())
s = input()
if len(s)>k:
    print(s[:k]+'...')
else:
    print(s)
count = int(input())
s = input()

if len(s) <= count:
    print(s)
else:
    print(s[:count] + '...')
k = int(input())
s = input()

if len(s) > k:
  print(s[:k]+"...")
else:
  print(s)
def main():
    K = int(input())
    S = input()
    ans = S if len(S) <= K else S[:K] + "..."
    print(ans)


if __name__ == "__main__":
    main()
k,s=open(0)
k=int(k)
print(s[:k]+'...'*(len(s)-1>k))
k = int(input())
s = input()

s_l = len(s)

if s_l <= k:
    print(s)
else:
    print(s[:k] + '...')
k = int(input())
s = str(input())

if len(s) > k:
    print(s[:k]+'...')
else:
    print(s)
K=int(input())
S=input()
N=len(S)
if N<=K:
    print(S)
else:
    print(S[:K]+'...')
K = int(input())
S = input()

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

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

if len(S) <= K:
    print(S)
else:
    print(S[:K] + '...')
# input
K = int(input())
S = input()

# check
if len(S) <= K:
    print(S)
else:
    print(S[:K] + "...")
k = int(input())
s = input()

if(k < len(s)):
  print(s[:k] + "...")
else:
  print(s)
K = input()
S = input()

k = int(K)
s = len(S)
if  k >= s:
	print(S)
else :
	a = S[:k]
	print(a + "...")
import numpy as np
import sys
import math

K = int(input())
S = input()

if len(S) <= K :
    print(S)
else:
    print(S[:K]+"...")
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

K = int(input())
S = input()

if len(S) <= K:
    print(S)
else:
    print(S[:K] + "...")
def main():
    n = int(input())
    word = str(input())
    if len(word) > n:
        print(word[0:n] + '...')
    else:
        print(word)
main()
K=int(input())
S=input()
if len(S) <= K:
	print(S)
else:
	print(S[0:K]+"...")
k=int(input())
s=input()
if len(s)<=k:
    ans=s
else:
    ans=s[0:k]+"..."
print(ans)
k=int(input())
n=input()
if len(n)<=k:
    print(n)
else:
    print(n[0:k]+"...")
n=int(input())
w=input()
wordlength=len(w)
if n>=wordlength: print(w)
else: print(w[:n]+'...')
def main():
    k = int(input())
    s = input()

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

if __name__ == "__main__":
    main()
k = int(input())
s = input()
if len(s) <= k:
	print(s)
else:
	print(s[:k]+'...')
k = int(input())
s = input()

if len(s) <= k:
  print(s)
elif k < len(s):
  tmp = s[0:k]
  print(tmp + "...")
k = int(input())
s = input()

if len(s)<=k:
    print(s)
else:
    print(s[:k]+'...')
K = int(input())
str = list(input())
 
if len(str) <= K:
  print("".join(str))
else:
  print("".join(str[0:K]) + "...")
n=int(input())
s=input()
if len(s)<=n:
    print(s)
else:
    print(s[:n]+"...")
import numpy as np

K = int(input())
S = input()
S = list(S)
mojiretu=''
if len(S) <= K:
    for x in S:
        mojiretu += x
    print(str(mojiretu))

else:
    del S[K:len(S)]
    for x in S:
        mojiretu += x
    print(str(mojiretu)+'...')
x=int(input())
y=str(input())
if len(y) > x:
  print(y[:x] + '...')
else:
  print(y)
k = int(input())
s = input()

if len(s)<=k:
  print(s)
else:
  print(s[:k]+"...")
K = int(input())
S = list(input())
if len(S) <= K:
    for j in range(len(S)):
        print(S[j], end = '')
else:
    for i in range(K):
        print(S[i], end = '')
    print('...')
K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  print(S[:K]+'...')
K=int(input())
S=list(input())
a=[]
if len(S)<=K:
    print(''.join(S))
else:
    for i in range(0,K):
        a.append(S[i])
        
    print(''.join(a)+'...')
K = int(input())
S = input()
A = len(S)
#print(A)
if A <= K:
    print(S)
    exit()
else:
    print(S[0:K]+"...")
import sys
readline = sys.stdin.readline


def main():
    k, s = [readline().rstrip() for _ in range(2)]
    print(s[0:int(k)] + "..." if len(s) > int(k) else s)


if __name__ == '__main__':
    main()
K = int(input(""))
S = input("")
if len(S) <= K:
    print(S)
else:
    print(S[:K] + "...")
k = int(input())
s = input()
print(s if len(s) <= k else s[:k]+"...")
k=int(input())
s=input()
print(s[:k]+"{0}".format("..."*(len(s)>k)))
K = int(input())
S =input()
if len(S)<=K:
	print(S)
else: print(S[:K]+'...')
K = int(input(''))
S = input("")
if len(S) > K:
    print(S[0:K]+"...")
else:
    print(S)
k = int(input())
s = str(input())

if( len(s) > k ):
  s = s[0:k] + '...'
print(s)
K=int(input())
S=input()
if (K>=len(S)):
    print (S)
else:
    print ((S[0:(K)]) + "...")
K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  print(S[:K] + "...")
a=int(input())
b=input()
c=len(b)
if c>a:
    print(b[:a]+'...')
else:
    print(b)
def abc168_b():
    K = int(input())
    S = str(input())
    if len(S) <= K: ans = S
    else: ans = S[:K] + '...'
    print(ans)

abc168_b()
k = int(input())
s = input()

if len(s) <= k :
  print(s)
else :
  tmp = s[0:k] + "..."
  print(tmp)
def b(s: str, k: int) -> str:
    if len(s) <= k:
        return s

    return s[:k] + "..."



k = int(input())
s = str(input())

r = b(s, k)
print(r)
K = int(input())
S = input()

print(S[:K], end='')
if len(S) > K:
    print('...')
else:
    print('')
K = int(input())
S = str(input())

if(K < len(S)):
    print(S[:K] + "...")
else:
    print(S)
n = int(input())
s = input()
if len(s) > n :
	print(s[:n]+ '...')
else :
	print(s)
k = int(input())
s = input()
l = len(s)
if l <= k:
    print(s)
else:
    print(s[:k] + "...")
K = int(input())
S = input()


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

if(k >= len(s)):
    print(s)
else:
    print(s[:k]+"...")
k = int(input())
s = input()

# print(len(s))

if k >= len(s):
  print(s)

else:
  for i in range(k):
    print(s[i], end='')

  print('...')

  # print('文字の長さは ' + str(len(s)) )
  # print('表示する文字数は ' + str(k) )
k = int(input())
s = input()
S = len(s)

if S <= k:
    print(s)
else:
    print(s[:k] + "...")
K = int(input())
S = input()
if K >= len(S):
  print(S)
else:
  print(S[0:K],'','...',sep='')
k = int(input())
s = input()

n = len(s)

if n <= k:
	print(s)
else:
	print('%s...' %(s[:k]))
from sys import stdin, exit

if __name__ == '__main__':
    k = int(input())
    s = input()
    print(s[0:k], end="")
    if (k<len(s)):
        print("...")
k = int(input())
s = input()

if len(s) <= k:
	print(s)
else:
    print(s[:k]+'...')
k = int(input())
s = input()
if len(s)<=k:
    print(s)
else:
    print(s[0:k]+'...')
k = int(input())
s = str(input())

if len(s) > k:
    print(s[:k]+"...")
else:
    print(s)
import sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

def resolve():
    K = I()
    s = S()

    if len(s)<=K:
        print(s)
    else:
        print(s[:K]+'...')

if __name__ == '__main__':
    resolve()
# -*- coding: utf-8 -*-
K = int(input())
S = input()
print("{}{}".format(S[:K], '...' if len(S) > K else ''))
# 1
# 2 
# 3
K=int(input())
S=input()
if len(S)>K:
    print(S[:K]+'...')
else:
    print(S)
K=int(input())
S=input()
if len(S)<=K:
    print(S)
else:
    print(S[:K]+"...")
K = int(input())
S = input()

if len(S) <= K:
    print(S)
elif len(S) > K:
    SK = S[: K]+ "..."
    print(SK)
#!/usr/bin/env python3
import sys

sys.setrecursionlimit(10 ** 8)
ni = lambda: int(sys.stdin.readline())
nm = lambda: map(int, sys.stdin.readline().split())
nl = lambda: list(nm())
ns = lambda: sys.stdin.readline().rstrip()


def solve():
    K = ni()
    S = ns()
    if len(S) > K:
        print(S[:K] + "...")
    else:
        print(S)


if __name__ == "__main__":
    solve()
k = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    print(s[:k]+"...")
from copy import copy, deepcopy
from collections import Counter
from math import sqrt, floor, factorial
from itertools import permutations, combinations, combinations_with_replacement
from operator import mul
from functools import reduce
import bisect

MOD = 10**9 + 7
INF = float('inf')

K = int(input())
S = input()

if len(S) <= K:
    print(S)
else:
    print(S[:K]+"...")
k = int(input())
s = input()		# 文字列の入力  abcdefg...

ans = s

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

print(ans)
K = int(input())
S = input()
s = ''
if len(S) <= K:
  print(S)
else:
  for i in range(K):
    s += S[i]
  print(s + '...')
k = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    print(s[:k] + "...")
k=int(input())
s=input()
l=len(s)
if (l<=k):
    print(s)
if(l>k):
    print(s[:k]+"...")
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    print(S[:K], "...", sep = "")
k=int(input())
s=input()
if len(s)<=k:
  print(s)
else:
  print(s[0:k]+'...')
k = (int)(input())
s = input()

if len(s) > k:
    print(s[:k]+"...")
else:
    print(s)
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    K = int(input())
    S = input().strip()

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




if __name__ == '__main__':
    main()
K = int(input())
S = input()


if len(S) <= K:
    print(S)
else:
    s = S[0:K]
    s1 = s + '...'
    print(s1)
# -*- coding: utf-8 -*-

###
# main
if(__name__ == '__main__'):
    # input
    k = int(input())
    s = input()

    postfix = ""
    if k < len(s):
        postfix = "..."
    elif len(s) < k:
        k = len(s)

    ans = s[0:k] + postfix

    print(ans)

# else:
    # do nothing
k = int(input())
s = input()
l = len(s)
if k >= l:
    print(s)
else:
    ans = ""
    i = 0
    while i < k:
        ans += s[i]
        i += 1
    ans += "..."
    print(ans)
k = int(input())
s = input()
if len(s) <= k:
	print(s)
else:
	print(s[:k] + '...')
k=int(input())
s=input()
print(s if len(s)<=k else s[0:k] + "...")
k=int(input())
s=input()
if k>=len(s):
    print(s)
else:
    print(s[:k]+"...")
K = int(input())
S = input()

if len(S) <= K:
    print(S)
else:
    s = S[:K] + "..."
    print(s)
# coding: utf-8
k = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    print(s[:k], end="")
    print("...")
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    print(S[0:K:1] + '...')
K=int(input())
S=input()

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

if len(K) > N:
    print(K[0:N] + "...")

else:
    print(K)
K = int(input())
S = input()
if len(S) <=  K:
    print(S)
else: print(S[:K] + "...")
K = input()
S = str(input())
if len(S)<=int(K):
    print(S)
if len(S)>int(K):
    K = int(K)
    S = str(S[0:K])+ "..."
    print(S)
n = int(input())
s = input()
if n >= len(s):
  print(s)
else:
  print(s[:n]+"...")
K = int(input())
S = str(input())

if(len(S) <= K):
    print(S)
else:
    S = S[0:K]   
    S += '...'
    print(S)
K = int(input())
S = input()
print(S) if len(S) <= K else print(S[:K] + "...")
def resolve():
  K = int(input())
  S = input()
  if len(S) <= K:
    print(S)
    return True
  print(S[:K]+"...")

if __name__ == "__main__":
    resolve()
k=int(input())
s=input()
L=len(s)
if L<=k:  print(s)
else:
    print(s[:k]+"...")
k = int(input())
s = input()
if len(s) <= k:
    ans = s
else:
    ans = s[:k] + '...'
print(ans)
k=int(input())
s=input()

if len(s) <= k:
    print(s)
else:
    print(s[0:k] + "...")
k = int(input())
s = input()

if len(s) <= k:
     print(s)
else:
     print(s[:k]+"...")
n = int(input())
s = input()

if len(s) <= n:
  print(s)
else:
  print(s[:n] + '...')
k=int(input())
s=input()

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