peterverebics/CodeNet_Python_118 huggingface dataset:
k = int(input())
s = list(input())
result =[]
for i,letter in enumerate(s):
    result.append(letter)
    if k == 0:
        print("...")
        break
    elif i+1 >= k:
        result.append("...")
        break
print("".join(result))
k = int(input())
s = input()

if len(s) <= k:
    print(s)
else:
    list(s)
    # print(s[:k])
    print(s[:k], '...')
import sys

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

print(K,len(S))

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

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

if len(s)<=k:
    print(s)
else:
    a=[]
    a.append(s[0:7])
    a.append("...")
    print("".join(a))
import sys

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

print(K,len(S))

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

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

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

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

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

    if len(s) < k:
        print(s)
    else:
        print(s[:k] + "...")
import sys
import numpy as np
input=sys.stdin.readline


k=int(input())
s=input()
#d=list(map(int,input().split()))
if len(s)<=k:
    print(s)
else:
    s=s[:k]
    s=s+"..."
    print(s)
k = int(input())
s = input()
slen = len(s)
if slen > k:
    print(s)
else:
    print(s[:k])
K = int(input())
S = input()

leng = len(S)
print(leng)

if(leng > K):
  word = S[0:K] + '...'
else:
  word = S

print(word)
def result(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        answer = S[:K]
        return answer + '...'
def main():
  k = str(input())
  s = str(input())
  h = len(k)
  w = len(s)
  
  if w<=h:
    print(s)
  else:
    print(s[:h] + '...')
    
main()
K=input()
S=input()
S=str(S)
C=len(S)
print(C)
if(int(C)<=int(K)):
  print(S)
else:
  print((S[:int(K)])+"...")
K = int(input())
S = input()
if len(S)<K:
  print(S)
else:
  print(S[:K]+'...')
def result(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        return S[:K] + '...'

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

if k < int(len(s)):
  print(s[0:int(e-k)-1]+'.'*3)
else:
  print(s)
K = int(input())
S = input()
len_S = len(S)
S0 = ''
if len_S<=K:
    print(S)
else:
    S0 += S[0:7]
    S0 +='...'
    print(S0)
K = input()
S = input()

K = int(K)

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

elif (len(S) > K):
    M = S[K:]
    print(M + "...")
s = [input() for i in range(2)]
if len(s[1]) < int(s[0]):
    print(s[1])
elif len(s[1]) >= int(s[0]):
    print(s[1][0:int(s[0])] + '...')
import numpy as np

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

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

else:
    del S[K:len(S)]
    print(S)
k = int(input())
s = input()
l = len(s)
S = s[:k]

if l >= k:
    print(S+'...')
else:
    print(s)
K = int(input())
S = str(input())
if len(S) < K:
  print(S)
else:
  print(S[:K] + '...')
k = int(input())
s = input()
con1 = k >= 1 and k <= 100
con2 = len(s) >= 1 and len(s) <= 100
con3 = s.islower() == True and con2 == True
if con1 == True and con3 == True:
    if k <= len(s):
        newstring = s[0:k] + "..."
        print(newstring)
    else:
        print(s)
else:
    print()
K = int(input())
S = input()

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

if len(s) >= k :
  print(s[0:k]+"...")
else:
  print(s)
import sys
a = []
for l in sys.stdin:
    a.append(l)

if int(a[0]) < len(a[1]):
  print(a[1][0:7] + '...')
else:
  print(a[1])
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[:K] + '...')
k = int(input())
s = input()
if len(s) < k:
    print(s)
else:
    s1 = s[0:k]
    s1 = s1 + '...'
    print(s1)
def main():
    K = int(input())
    S = input()
    if len(S) <= K:
        print(S)
    else:
        print(S[0:7]+"...")
    #a = list(map(int, input().split()))
    #print(a)
    
    
if __name__ == '__main__':
    main()
K = int(input())
S = input()

#print(len(S))
#print(S[1:3])

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

if k > len(s):
  print(s)
else:
  print("{}...".format(s[:k]))
K = int(input())
S = (input())

k = [K]

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

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

s = int(len(S))
tmp = []

if s < K:
    print(S)
else:
    for i in range(K):
        tmp.append(S[i])
    tmp.append("...")

#print(tmp)
print("".join(map(str, tmp)))
k=input()
n=input()

m=len(n)

t=int (k)



if(m<=t):
  print("n")
  
else:
  for i, name in enumerate(n):
    if i==t:
      break
    print(name,end='')
import math
K = int(input())
S = str(input())

nagasa = len(S)

P = '...'

if nagasa < K:
	print(S)
else:
	S = S[0:K]+P
	print(S)
k = int(input())
s = input()
if len(s) > k:
    print(f'{s[:7]}...')
else:
    print(s)
k=int(input())
s=str(input())

ss = list(s)

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

S_len = len(S)

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

if(S_len >= K):
    print(S[0:K-1] + "…")
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[:k] + '...')
else:
  print(s)
k = int(input())
s = input()

if (k > len(s)):
  print(s)
elif(k < len(s)):
  ans = k-len(s)
  print(s[:ans])
K = int(input())
S = input()

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

if s <= K:
  print(S)
else:
  print(S[:(K-1)] + "...")
import sys
#import time
#import copy
#from collections import deque, Counter, defaultdict
#from fractions import gcd
#import bisect
#import itertools
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

def ri():
    return list(map(int, input().split()))
def rs():
    return list(input().strip())

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

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

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

print(len(S), K)
if K < len(S):
    print(f"{S[:K]}...")
else:
    print(S)
K = int(input())
S = str(input().lower())
if len(S) <= K:
    print(S)
elif len(S) > K:
    stol = list(S)
    stol[K-1] = "..."
    print(stol)
n = int(input())
s = input()
if len(s) < n:
    print(s)
else:
    print(s[:n] + '...')
K = int(input())
S = str(input())
if K > len(S):
    print (S)
else:
    print (S[0:K]+ " ... ")
K = input()
S = input()

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

if len(s) > k:
  print(s[0:7] + "...")
else:
  print(s)
K = int(input())
S = str(input())
if len(S) < K:
  print(S)
else:
  print(S[:K + 1] + '...')
K=int(input())
S=input()
C=0
B=0
D=0
C=S
B=len(C)
B=int(B)
B=B+1
D=S+'...'
if B>=K:
    print(S)
else:
    print(D)
n = int(input())
a = input()
if len(a) > n:
  print(a[0:n+1]+'...')
else:
  print(a )
K = int(input())
S = str(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[0:(K-1)]) + "...")
K = int(input())
S = input()

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

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

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

if K > len(S):
    print(S)
else:
    print(S[:K] + '...')
K = int(input())
S = input()
x = len(S)
 
if x <= K:
  print(S)
else:
  print(S[K:])
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

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

t = ""
a = len(s)


if k >= a:
    print(s)
else:
    for i in range(k, len(s)):
        t += "."

    print(s[:k] + t)
k = int(input())
s = input()


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

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

if k >= len(s):
    print(s)
else:
    print(s[0:(k - 1)], "...")
N = int(input())
S = str(input())
if N > len(S):
    print(S)
else:
    print(S[0:N]+'...')
k = int(input())
s = input()

if k > len(s):
    print(s)
else:
    print(f"{s[:k]}...")
nb = int(input())
sentence = input()

if len(sentence) > nb:
	print(sentence[0:nb-1] + '...')
else:
	print(sentence)
k = int(input())
s  = input()

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

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

    Num = int(input())

    moji = str(input())

    if len(moji) >= Num:
        moji_cut = moji[:Num] + '...'
        
    else:
        moji_cut = moji

    print(moji_cut)

if __name__ == '__main__':
    TripleDots()
K=int(input())
S=input()
length=len(S)
if length < K:
    print(S)
else:
    print(S[:K]+"...")
K = int(input())
S = list(input())

if (len(S) <= K):
	print(''.join(S))
else:
	string = S[0:K+1]
	print(''.join(string) + '...')
K = int(input())
S = input()
SS = (int(len(S)))
if SS-K <= 0:
  print(S)
else:
  print((S[:SS-K])+('.'*K))
from sys import stdin
import math
a=int(stdin.readline())
b=stdin.readline()

if len(b)<=a:
    print(b)
else:
    for k in range(0,a):
        print(b[k],end='')
    print('...',end='')
k = int(input())
s = input()
if k > len(s):
    print(s)
else:
    print(s[:k] + '...')
K=int(input())
S=input()
B=0
D=0
B=len(S)
B=int(B)
B=B+1
D=S+'...'
if B>=K:
    print(S)
else:
    print(D)
k = int(input())
s = list(input())
if k>=len(s):
    print(s)
else:
    for i in range (k):
        print(s[i],end="")
    print("...")
k=int(input())
s=str(input())

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

else:
    print(s[0:k],'...')
K = int(input())
S = input()

if S.islower() and len(S) < K and len(S) <= 1 and len(S) >= 100 and K <= 1 and K >= 100:
    print(S)
elif S.islower() and len(S) > K and len(S) < 1 and len(S) > 100 and K <= 1 and K >= 10:
    print(f"{S[0:K]}{'...'}")
k = int(input())
n = input()
if len(n)>k:
    print(n+'...')
else:
    print(n)
N = int(input())
S = list(input())
s = len(S)
m = "..."
if s<N:
    print(''.join(S))
else:
    k = ''.join(S[:N])
    print(k+m )
k = int(input())
s = input()
i = ""
if len(s) <= k:
  print(s)
else: 
  for j in range(k):
    i = i + s[j]
    print(i + '...')
import sys

k, s = sys.stdin.readlines()
k = int(k)
if len(s) <= k:
    print(s)
else:
    print('{}...'.format(s[:k]))
K=int(input())
S=input()

def moji(S,K):
    if len(S)<=K:
        print(S)
    else:
        T=""
        for i in range(len(S)):
            if i <K:
                 T+=S[i]
            if i >=K:
                continue
        T+="..."
        print(T)

moji("S",K)
#input an interget
k=int(input())
#input an string
str1=str(input())
#get the length of the string
x=int(len(str1))
#get the difference in length between k and s
i=x-k

#make a second string for the appending
for i in range(k):
    str2="..."

#if statement about how the string will function
#if the string is the same length as k then print it
if i==0:
    print(str1)
#if not, delete the last character of the string
else:
    for i in range(x):
        str1=str1[0 : i : ] + str1[i+1 : : ]
#and then join the two strings together
    newstr="".join((str1,str2))
    print(newstr)
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[:k], '...', sep='')
else:
    print(s)
N=int(input())
a=input()
i=0
he=""
if len(a)>N:
    for m in range(N):
        he=he+a[i]
        i=+1
    he=he+"..."
print(he)
K = int(input())
S = input()

if len(S) <= K:
    print(S)
else:
    print(S[:K], '...')
import sys
input = sys.stdin.readline
K = int(input())
S = input().replace('\n', '')
if len(S) < K:
    print(S)
else:
    print(S[:K] + '...')
K=int(input())
S=input()

if len(S)<=K:
    print(S)
else:
    print(S,"...")
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
import bisect
import numpy as np


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:
    print(S)
else:
    print(S[0:(K-1):1],"...")
n = int(input())
s = input()
final = s[:n] + "..."
print(final)
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],'...')
k = int(input())
s = input()
print("{}{}".format(s[0:k], "..."))
k = int(input())
s = input()
w = len(s)
if w <= k:
    print(s)
else:
    ans = s[1:k]
    print('%s...' % ans)
k = int(input());
s = input();
n = int(len(s));
a = '…'

if k >= n:
    print(s);
else:
    print(s[:k] + a);
K = int(input())
S = input()

if K == 1:
  print(S[0])
elif len(S) <= K:
  print(S)
else:
  S_ = S[0:K]
  print(S_+'...')
try:
  k=int(input())
  s=input()
  if(len(s)<=k):
    print(s)
  else:
    ans=''
    ans=s[:7]+'...'
    print(ans)
except EOFError as e:
  pass
k=int(input())
s=input()
a=int(len(s))
if a<=k:
	print(s)
else:
	print(s[0:k+1]+'...')
K = int(input())
S = list(input())
print(''.join(S) if len(S) <= K else ''.join(S[:7]) + '...')
k = int(input())
s = input()

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

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

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

else:
  print(s[:k],"...")
k, s = open(0)
k = int(k)
print(s[:k] + '...'*(len(s)>k))
k = int(input())
s = input()
print(s if len(s) <= k else "{}...".format(s[:7]))
K = int(input())
S = input()

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

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

n = len(s)
if k <= n:
  print(s)
else:
  print(s[:k]+'...')
def main():
  k = int(input())
  s = input()
  val = len(s)-k
  if val > 0:
    print(s[:k]+'...')


if __name__ == '__main__':
  main()
k = int(input())
s = input()
 
if len(s) < k :
  print(s)
else:
  print(s[0:k]+"...")
K=int(input())
S=input()
a=len(S)
if a<=K:
  print(S)
else:
  print(S[:K]+"."*(a-K))
#-*-coding:utf-8-*-

def main():
    k = int(input().strip())
    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:
    print("{0}...".format(S[0:K]))
k = int(input())
s = input()

if len(s) >= k :
    print(s[:k]+'...')
else :
    print(s)
k = input()
s = input()
klen = len(k)
slen = len(s)
if slen > klen:
    print(s)
else:
    print(k + "...")
if __name__ == "__main__":
    K = int(input())
    S = input()
    if K > len(list(S)):
        print(S)
    else:
        for i in range(K):
            print(list(S)[i], end='')
        print("...")
K = int(input())
S = input()

if 0 < K < 101 and 0 < len(S)+1 < 101:
    if len(S) < K:
        print(S)
    else:
        print(S[0:K] + "...") 
elif K > 100 or K < 1:
    print("Please choose an interger from 1 to 100")
elif len(S) > 100 or len(S) < 1:
    print("Please enter at least at least 1 string and not more than 100")
K = int(input())
S = input()
if (len(S) <= K):
  print(S)
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))
if __name__ == "__main__":
    k = I()
    s = S()
    print(s if len(s) <= k else print(s[:k] + "..."))
k = int(input())
s = str(input())
n = len(s) - k
print(s[:n-1]+'...' if n > 0 else s)
# -*- coding: utf-8 -*-
"""
Created on Wed May 27 14:43:56 2020

@author: 17664
"""

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

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

if len(S)-str_len > 0:
  show_length = len(S)-str_len
  print(S[0:show_length-1], end="...")
else:
  print(S)
K = input()
S = input()
LS = len(S)
IK = int(K)

if LS < IK:
    print(S)

elif LS > IK:
    print(S[0:IK] + '...')
n = int(input())
s = input()
if len(s)<=n:
  print(s)
else:
  print(s[:7]+'.'*(len(s)-n))
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    a = len(S) - K
    b = a-2
    print(S[:b]+'...')
k = input()
s = len(input())
klen = len(k)
if s > klen:
    print(s)
else:
    print(k + "...")
def actual(k, s):
    if len(s) >= k:
        return f'{s[:k]}...'

    return s

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

print(actual(k, s))
K=int(input())
S=input()
s=list(S)

if len(s) < K:
    print(S)
else:
    print(s[0:(K-1):],"...")
K=int(input())
S=list(input())
answer=[]
if len(S)>=K:
  for i in range(K):
    answer.append(S[i])
  answer.append('...')
  s=''
  for i in range(len(answer)):
    s+=answer[i]
  print(s)
  print(1)
else:
  g=''
  for i in range(len(S)):
    g+=S[i]
  print(g)
k = int(input())
s = str(input())
d = len(s)
f = s[0:7]
b = f + '...'
if k <= d:
    print(b)
else:
    print(s)
# -*- coding: utf-8 -*-
"""
Created on Sat May 30 16:59:03 2020

@author: Tofu
"""

def tran(N,string):
    #print(N)
    #print(string)
    if len(string) > N:
        strout = string[:N]+'...'
        return strout
    else:
        return string

if __name__ == '__main__':
    N = int(input())
    string = input()
    ans = tran(N,string)
def x(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        x = S[:K]
        return x + '...'
import numpy as np

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[:K],"."*(len(S)-K))
N=int(input())
S=input()
if len(S)>=N:
    print(S[0:N]+"...")
else:
    print(S)
K=input()
S=input()
K=int(K)
S=str(S)
longS=len(S)
if longS <= K :
    print(S)
else:
    head=S[0]
    print(head + "...")
K=int(input())
S=list(input())
answer=[]
if len(S)>=K:
  for i in range(K):
    answer.append(S[i])
  answer.append('...')
  s=''
  for i in range(len(answer)):
    s+=answer[i]
  print(s)
else:
  g=''
  for i in range(len(S)):
    g+=S[i]
  g+='...'
  print(g)
N = int(input())
S = input()

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

if int(string_list[0]) > len(str(string_list[1])):
    print(string_list[1])
else:
    print(str(string_list[1])[: int(string_list[0])] + "...")
K = int(input())
S = input()
print(S if (len(S) < K) else (S[:K] + "..."))
#n = int(input())
#a,b = map(int,input().split())
#a_L = list(map(int,input().split()))
k = int(input())
s = list(input())
#print(len(s))
if len(s)+1 <= k:
    print("".join(s))
else:
    t = "".join(s[:k]) + "..."
    print(t)
k = int(input())
s = input()
s = s.lower()
ls = []
if len(s) < k:
    print(s)
else:
    result = s[:k]+"..."
    print(result)
k=int(input())
s=input()
if(len(s)>k):
    result=s[:7]+'...'
    print(result)
else:
    print(s)
k = int(input())
s = input()
x = len(s)

if k >= x:
  print(s)

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

if len(S) <= K:
  print(S)
else:
  print(S[0:K-1],"...")
K = int(input())
S = input()

new_S = S[:K]
new_S += '...'

print(new_S)
n=int(input())
l=input()
if len(l)<=n:
  print(l)
else:
  print(l[:n+1]+"...")
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()
n = len(S)

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

for i in s:
  n += i
  
if k < int(len(s)):
  print(n[0:int(e-k)-1]+'.'*3)
else:
  print(n)
K = int(input())
S = input()

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

S_len = len(S)

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

if(S_len >= K):
    print(S[0:K] + "…")
k = int(input())
s = input()
if len(s) < k:
    print(s)
else:
    print(str(s[0:k]) + "...")
n=int(input())
k=input()
if len(k)<=n:
  print(k)
else:
  a=k[0:n+1]
  print(a+"...")
k = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    print(s[:k])
from collections import defaultdict, deque
import sys
import heapq
import bisect
import itertools
import queue
import copy
import time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))

def inpl_str(): return list(sys.stdin.readline().split())

def inpl_strl(): return list(sys.stdin.readline())

K = inp()
S = inpl_strl()
if K >= len(S):
    print(''.join(S))
else:
    s = ''.join(S[:K])
    print(f'{s}...')
K = int(input())
S = input()

S_len = len(S)

if S_len < K:
    print(S)
else:
    print(S[: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:
    print("{}...".format(s[:-(k + 1)]))
K = int(input())
S = list(input())
len_S = int(len(S))
S1 = ' '

if len_S <= K:
  print(K)
else:
  del S[K:]
  for x in S:
    S1 += x
  print(S1 + '...')
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:print(s)
else:print(s[0:k:]+"...")
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    print(S[:7] + "...")
k = int(input())
s = input()
if len(s) <= k:
  print(s)
else:
  s[0:k] + "..."
K = int(input())
S = input()

a = len(S)


if a < K:
    print(S)
else:
    print(S[:K] + ("..."))
k=int(input())
S=input()
while True:

    if k>=len(S):
         print(S)
         break
    temp=""
    for i in range(0,k+1):
        temp+=S[i]
    temp+='...'
    print(temp)
    break
K = int(input(), 10)
S = input().lower()

if 0 < K < 101 and 0 < len(S) < 101:
    if len(S) < K:
        print(S)
    else:
        print(S[:K] + "...") 
elif K > 100 or K < 1:
    print("Please choose an interger between 1 to 100")
elif len(S) > 100 or len(S) < 1:
    print("Please enter at least at least 1 string and not more than 100")