Problem:
 Score: 200 points    Problem Statement  We have a string S consisting of lowercase English letters.  If the length of S is at most K , print S without change.  If the length of S exceeds K , extract the first K characters in S , append ... to the end of them, and print the result.      Constraints   K is an integer between 1 and 100 (inclusive).  S is a string consisting of lowercase English letters.  The length of S is between 1 and 100 (inclusive).         Input  Input is given from Standard Input in the following format:  K  S       Output  Print a string as stated in Problem Statement.        Sample Input 1 7
nikoandsolstice      Sample Output 1 nikoand...  nikoandsolstice has a length of 15 , which exceeds K=7 .  We should extract the first 7 characters in this string, append ... to the end of them, and print the result nikoand... .       Sample Input 2 40
ferelibenterhominesidquodvoluntcredunt      Sample Output 2 ferelibenterhominesidquodvoluntcredunt  The famous quote from Gaius Julius Caesar.

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

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

Solution (Python):
k = int(input())
s = input()

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

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

Solution (Python):
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()

Solution (Python):
N=int(input())
a=input()
i=0
he=""
if len(a)>N:
    for m in range(N):
        he=he+a[i]
        i=i+1
    he=he+"..."
    print(he)
else:
  print(a)

Solution (Python):
def main():
  k = int(input())
  s = input()
  if len(s) > k:
    print(s[:k]+str('...'))
  else:
    print(s)
 
    
    
if __name__ == '__main__':
  main()

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

Solution (Python):
K = int(input())
S = input()
S_length = len(S)
if K >= S_length:
    print(S)
else:
    tmp = S[:K] + '...'
    print(tmp)

Solution (Python):
K=int(input())
S=str(input())
if len(S) <= K:
    print(S)
else:
    ans = S[0]
    for i in range(1,K):
        ans += S[i]
    ans += "..."
    print(ans)

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

Solution (Python):
n = int(input())
s = input()

if len(s) > n:
  print(s[:n] + '...')
else:
  print(s)

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
K,S=[input() for i in range(2)]
if len(S)<=int(K):
  print(S)
else:
  print(S[0:int(K)]+"...")

Solution (Python):
K = int(input())
S = str(input())

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

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

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
K = int(input())
S = input()

if len(S) > K:
    for i in range(K):
        print(S[i],end="")
    print("...")
else:
    print(S)

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
import sys
input = sys.stdin.readline

k=int(input())
s=input().rstrip()

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

Solution (Python):
K = int(input())
S = input()
ans = ""
if K >= len(S):
    print(S)
else:
    for i in range(K):
        ans += S[i]
    print(ans + "...")

Solution (Python):
k = int(input())
s = input()

if len(s) > k:
  print(f'{s[:k]}...')
else:
  print(s)

Solution (Python):
K = int(input())
S = input()
print(S[:K]+(K<len(S))*"...")

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
k = int(input())
s = str(input())

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

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

Solution (Python):
K = int(input())
S = input()

if len(S) <= K:
    print(S)
else:
    str = ''
    for i in range(K):
        str += S[i]
    str += "..."
    print(str)

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
K=int(input())
S=input()
l=[]

if len(S)<=K:
    print(S)
else:
    for i in range(K):
        l.append(S[i])
    print("".join(l)+'...')

Solution (Python):
def main():
    K = int(input())
    S = input().rstrip()
    if len(S) <= K:
        print(S)
    else:
        print(S[:K] + "...")


if __name__ == '__main__':
    main()

Solution (Python):
k = int(input())
s = list(input())

l=[]
if(len(s)<=k):
  word = "".join(s)
  print(word)
else:
  for i in range(k):
    l.append(s[i])
    name = "".join(l)

  print(name + "...")

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
K = int(input())
s = input()
if len(s) <= K:
    print(s)
else:
    ans = s[:K] + '...'
    print(ans)

Solution (Python):
def main():
    k = int(input())
    s = input()
    if len(s) <= k:
        print(s)
    else:
        print(f"{s[:k]}...")

if __name__ == "__main__":
    main()

Solution (Python):
K = int(input())
N = list(input())

ans = []
if len(N) > K:
	for i in range(len(N)-K):
		
		N.pop(-1)
	N.append("...")
print("".join(N))

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

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

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
import numpy as np





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

main()

Solution (Python):
T=int(input())
S=str(input())
s=len(S)
if s<=T:
    print(S)
else:
    print(S[:T]+'...')

Solution (Python):
K = int(input())
S = input()

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

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

Solution (Python):
k = int(input())
s = input()
if len(s) > k:
    print("{}{}".format(s[:k], '...'))
else:
    print(s)

Solution (Python):
k = int(input())
s = list(input())
an_lis = []
if len(s) <= k:
    ans = "".join(s)
    print(ans)
else:
    for i in range(k):
        an_lis.append(s[i])
    an_lis.append("...")
    ans = "".join(an_lis)
    print(ans)

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

K = I()
S = S()

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

Solution (Python):

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

Solution (Python):

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

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

Solution (Python):
K = int(input())
S = input()
 
if len(S) <= K:
  print(S)
elif len(S) > K:
  print(S[0:K]+"...")

Solution (Python):
a=int(input())
b=input()
if a>=len(b):
  print(b)
else:
  print(b[0:a]+"...")

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

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

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

Solution (Python):
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    print("{0}...".format(S[0:K]))

Solution (Python):
K = int(input())
S = input()

if len(S)>K:
    print (S[:K], "...",sep="")
else:
    print (S)

Solution (Python):
k = int(input()) 
s = input() 


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

Solution (Python):

k=int(input())

str1=str(input())

x=int(len(str1))

y=0

str2="..."



if x<=k:
    print(str1)

else:
    while y<k:
        print(str1[y],end=(""))
        y+=1
    print(str2)

Solution (Python):

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


if int(k)>=1 and int(k)<=100 and len(s)>=1 and len(s)<=100: 

    if len(s) > k:

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

    else:
        print (s)

Solution (Python):

while True:
     k = int(input())
     if 1 <= int(k) <= 100:
         break;
     print ('Error Invalid Input for K')


while True:
     s = input()
     if 1 <= len(s) <= 100:
         break;
     print ('Error Invalid Input for s')


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

Solution (Python):




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

str = S

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

Solution (Python):

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

Solution (Python):
k=int(input()) 
s=input() 

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

Solution (Python):


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

Solution (Python):




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

x = 0

length = len(S)

if length <= K:
    print(S)
else:
    while x < K:
        print(S[x], end=(""))
        x += 1
    print("...")

Solution (Python):
K=int(input())
S=input()



if len(S) > K :
    print (S[0:K]+'...')

else:
    print(S)

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

Solution (Python):

K = int(input())

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

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

Solution (Python):
k = int(input())
s = input()

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

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

Solution (Python):








K = int(input())  
S = input() 
value=len(S)    

if value <= K: 
    print(S)    
elif value > K : 
    x=0     
    while x<K: 
        print((S[x]),end=(""))  
        x+=1
    print("...")

Solution (Python):







K = int(input()) 
S = input() 
second_answer = [] 
x = 0 

length = len(S) 

if length <= K : 
    print(S) 
else:
    while x<K : 
        print(S[x], end= (""))
        x += 1
    print("...")

Solution (Python):
n = int(input())
k=input()
if len(k)>n:
    print(k[:n]+'...')
else:
    print(k)

Solution (Python):
K = int(input())
S = input()

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

print(S)

Solution (Python):
k = int(input())
s = input()

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

print(s)

Solution (Python):
def Ii():return int(input())
def Mi():return map(int,input().split())
def Li():return list(map(int,input().split()))
 
k = Ii()
a = input()
m = len(a)
if k >= m:
  print(a)
else:
  print(a[:k],end="")
  print('...')

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
k = int (input())
s = input()
line = []

if (len(s) > k):
  for i in range(k):
    line.append(s[i])
  print (''.join(line) + "...")
else:
  print(s)

Solution (Python):
N = int(input())
s = input()

if len(s) > N:
  s = s[:N] + "..."
  
print(s)

Solution (Python):

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

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

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

Solution (Python):
K = int(input())
S = input()

if(len(S) <= K):
    print(S)
else:
    for i in range(K):
        print(S[i], end="")
    print("...")

Solution (Python):
K = int(input())
S = input()

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

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

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

Solution (Python):
n = input()
n = int(n)
word = input()
if n >= len(word):
    print(word)
else:
    for i in range(n):
        print(word[i], end='')
    print('...')

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

Solution (Python):
k = int(input())
s = input()
if len(s) <= k:
  print(s)
elif len(s) > k:
  print((s[0:k] + '...'))

Solution (Python):
k = int(input())
s = input()
a = list(s.split())
if len(s) <= k:
  print(s)
elif len(s) > k:
  print((s[0:k] + '...'))

Solution (Python):


import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    k = ni()
    s = ns()
    n = len(s)
    if n <= k:
        print(s)
    else:
        print(s[:k] + "...")

if __name__ == "__main__":
    main()

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

Solution (Python):
K = int(input())
S = input()

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

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

Solution (Python):
K = int(input())
s = input()
ans = ''.join(list(s)[:K])
print(ans.ljust(K+3, '.') if s != ans else s)

Solution (Python):
def word():
    K = int(input())
    S = str(input())
    A = ""
    if len(S) <= K:
        print(S)
        return
    else:
        for i in range(K):
            A = A + S[i]
    A = A + "..."
    print(A)
    return
word()

Solution (Python):
a = int(input())
b = input()
if len(b) <= a:
  print(b)
else:
  print(b[:a]+'...')

Solution (Python):
k=int(input())
s=input()

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

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

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

Solution (Python):
n=int(input())
w=input()
alen=len(w)
blen=len(w)

if blen > n:
    
    print(w[:n]+"..." )
else:
    print(w)

Solution (Python):
n = int(input())
txt = input()

print(txt[:n]+"..." if bool(txt[n:]) else txt)

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
s = int(input())
n = input()
x = n[0:s]
y = '...'
if s >= len(n):
	print(n)
else:
	print(x + y)

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
k = int(input())
s=input()
if len(s)<=k:
    print(s)
else:
    print(s[:k],end='...')

Solution (Python):
k = int(input())
s = input()
t = s[0]
if len(s) <= k:
    print(s)
else:
    for i in range(1, k):
        t += s[i]
    print(t + '...')

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

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

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
K=int(input())
S=str(input())

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

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

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
K = int(input())
S = input()
if len(S)<=K:
    print(S)
else:
    s_list = list(S)[0:K]
    print("".join(s_list)+"...")

Solution (Python):
k = int(input())
l = str(input())

if k >= len(l):
  print(l)
else:
  print(l[:k]+"...")

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

Solution (Python):
k,s=open(0).read().split();print(s if len(s)<=int(k) else s[:int(k)]+"...")

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

Solution (Python):
k = int(input())
s = input()

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

print(s)

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):



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

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

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

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

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

Solution (Python):
K=int(input())
S=input()
list1=[]
if len(S)<=K:
  print(S)
else:
  for i in range(K):
    list1.append(S[i])
  list1.append("...")
  S2="".join(list1)
  print(S2)

Solution (Python):
k=input()
str=input()
if len(str)>int(k):
    print(str[:int(k)]+'...')
else:
    print(str)

Solution (Python):
k=int(input())
s=list(input())
num_list=[]
if k<len(s):
    for x in range(k):
        num_list+=s[x]
        x+=1
    t=''.join(num_list)+'...'
else:
    t=''.join(s)
print(t)

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
from sys import stdin
data = stdin.readlines()

k = int(data[0].split()[0])
s = data[1].split()[0]

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

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
n = int(input())
s = input()

if len(s) <= n:
    print(s)
else:
    print(s[0:n],'...', sep='')

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
K = int(input())
S = input()

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

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

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)

def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')







def solve():
    K = II()
    S = input()

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

if __name__ == '__main__':
    solve()

Solution (Python):
k = int(input())
s = input()

if len(s) > k:
  print("{}...".format(s[0:k]))
else:
  print(s)

Solution (Python):
def main():
    K=int(input())
    S=input()
    if len(S)<=K:
        print(S)
        return
    print(S[:K]+'...')
main()

Solution (Python):
K = int(input())
S = list(input())
if len(S) <= K:
    print(*S,sep="")
else:
    S2 = S[:K]
    S2.append("...")
    print(*S2,sep="")

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

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

Solution (Python):
x=int(input())
y=str(input())
if len(y) > x:
  print(y[:x] + '...')
else:
  print(y)

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

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

Solution (Python):
import sys

stdin = sys.stdin


def ni(): return int(ns())


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


def naa(N): return [na() for _ in range(N)]


def ns(): return stdin.readline().rstrip()  


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

Solution (Python):
nb = int(input())
sentence = input()

if len(sentence) > nb:
	print(sentence[0:nb] + '...')
else:
	print(sentence)

Solution (Python):
k = int(input()) 

s = input() 
string = ''

if k < len(s):
    for x in range(k):
        
        string = string + s[x]
    string = string + '...'
else:
    string = s

print(string)

Solution (Python):
import sys

K = int(input())


S = input()





if len(S) <= K:
    print(S)
    sys.exit()

else:
    S = str(S)
    print(S[:K]+"...")
    sys.exit()

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
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













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

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

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
n=int(input())
s=input()

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

Solution (Python):
K = int(input())
S = input()

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

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

Solution (Python):
K = int(input())
S = list(input())
S2 = []

if len(S) <= K:
    print(''.join(S))
else:
    for i in range(K):
        n = S[i]
        S2.append(n)
if len(S2) == K:
    print(''.join(S2) + '...')

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
import sys

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

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

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
k = int(input())
s = input()

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

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

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
k=int(input())
s=input()

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

Solution (Python):
k = int(input())
s = input()

if len(s)>k:
    print('{}...'.format(s[:k]))
else:
    print(s)

Solution (Python):
input_num = int(input())
input_str = input()
if len(input_str) <= input_num:
    print(input_str)
else:
    print(input_str[:input_num]+"...")

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

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

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

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

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

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

Solution (Python):
k = int(input())
s = input()

if k >= len(s):
  print(s)
else :
  l_s = list(s)
  n_s = "".join(l_s[:k])+"..."
  print(n_s)

Solution (Python):
K = int(input())
S = input()

if K < len(S):
        print(str(S[0:K]) + '...')
else:
    print(S)

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

Solution (Python):
def main():
    k = int(input())
    s = input()
    if len(s) <= k:
        print(s)
    else:
        print(f"{s[:k]}...")

if __name__ == "__main__":
    main()

Solution (Python):
k, s = open(0).read().split(maxsplit=2)
k = int(k)
if len(s) <= k:
    print(s)
else:
    print(s[:k] + "...")

Solution (Python):


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

if __name__ == "__main__":
    main()

Solution (Python):
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)+'...')

Solution (Python):
k=int(input())
word=input()
if len(word)<k+1:
  print(word)
elif len(word)>k:
  count=0
  for i in word:
    print(i,end="")
    count+=1
    if count==k:
      break
  print("...")

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

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
K = int(input())
S = input()

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

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

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

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
K = int(input())
S = input()
E = ''
if K >= len(S):
  print(S)
else:
  for i in range (K):
    E += S[i]
  print(E + '...')

Solution (Python):
a=int(input())
b=input()
c=len(b)
if c<=a:
  print(b)
else:
  for i in range(a):
    print(b[i],end="")
  print('...')

Solution (Python):
a=int(input())
b=input()
c=len(b)
if c<=a:
  print(b)
else:
  for i in range(a):
    print(b[i],end="")
  print('...')

Solution (Python):








def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))





def main():
	k=II()
	s=input()

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
















if __name__ == "__main__":
	main()

Solution (Python):
import sys
input = sys.stdin.readline






def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))





def main():
	k=II()
	s=input()

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
















if __name__ == "__main__":
	main()

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

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

Solution (Python):
s = int(input())
k = input()

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

Solution (Python):
s = int(input())
t = input()

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

Solution (Python):
k = int(input())
s = input()

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

Solution (Python):
import sys


def int1(x): return int(x) - 1
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def mi1(): return map(int1, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def lli(rows_number): return [li() for _ in range(rows_number)]


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

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

Solution (Python):
def main():
    n = int(input())
    word = str(input())
    if len(word) > n:
        print(word[0:n] + '...')
    else:
        print(word)
main()

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

Solution (Python):

def main():
    cnt = int(input())
    str = input()

    sum_str = []
    sum_cnt = 0
    for i in range(len(str)):
        sum_cnt += 1
        if (sum_cnt > cnt):
            sum_str.append('...')
            break
        sum_str.append(str[i])

    str2 = ''.join(sum_str)

    print(str2)


if __name__ == "__main__":
    main()

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
length = int(input())
string = input()

if len(string) <= length:
  pass
else:
  string = string[:length]
  string = string + "..."
print(string)

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

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

Solution (Python):
from sys import stdin, stdout
for _ in range(1):
    n=int(stdin.readline())
    s=input();cur=len(s)
    print(s[:n]+'...'*(cur>n))

Solution (Python):
K=int(input())
S=input()
list=list(S)

if len(list) <= K:
    print(S)
else:
    list2=list[:K]
    ret=''.join(list2)+'...'
    print(ret)

Solution (Python):
k=int(input())
s=input()

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

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

Solution (Python):
K=int(input())
S=input()
if len(S) <= K:
    print(S)
else:
    print(f'{S[:K]}...')

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

Solution (Python):
K = int(input())
S = input()

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

Solution (Python):
N = int(input())
S = input()

if len(S) > N:
  print(S[0:N]+'...')
else:
  print(S)

Solution (Python):
def main():
  l = int(input())
  w = input()
  
  wl = len(w)
  
  if wl > l:
    word = w[:l]
    
    w = word + '...'
    
  print(w)
  
  
main()

Solution (Python):
k=int(input())
s=str(input())

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