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):


"""
    Author : thekushalghosh
    Team   : CodeDiggers
 
    I prefer Python language over the C++ language :p :D
        
    Visit my website : thekushalghosh.github.io
"""
import sys,math,cmath,time
start_time = time.time()



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


 
def main():
    global tt
    if not ONLINE_JUDGE:
        sys.stdin = open("input.txt","r")
        sys.stdout = open("output.txt","w")
    t = 1
    for tt in range(t):
        solve()
    if not ONLINE_JUDGE:
        print("Time Elapsed :",time.time() - start_time,"seconds")
        sys.stdout.close()
    

def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    return(input().strip())
def invr():
    return(map(int,input().split()))
 

def counter(a):
    q = [0] * max(a)
    for i in range(len(a)):
        q[a[i] - 1] = q[a[i] - 1] + 1
    return(q)
 
def string_counter(a):
    q = [0] * 26
    for i in range(len(a)):
        q[ord(a[i]) - 97] = q[ord(a[i]) - 97] + 1
    return(q)

def power_two(n):
    if n == 1:
        return(True)
    sttr = str(n)
    len_str = len(sttr)
    sttr = list(sttr)
    num = 0
    if (len_str == 1 and sttr[len_str - 1] == '1'): 
        return(False)
    while (len_str != 1 or sttr[len_str - 1] != '1'):
        if ((ord(sttr[len_str - 1]) - ord('0')) % 2 == 1):
            return(False)
        j = 0; 
        for i in range(len_str):  
            num = num * 10 + (ord(sttr[i]) - ord('0')); 
            if (num < 2): 
                if (i != 0):  
                    sttr[j] = '0'
                    j += 1
                continue
  
            sttr[j] = chr((num // 2) + ord('0'))
            j += 1; 
            num = (num) - (num // 2) * 2
        len_str = j
    return(True)

def log_two(n): 
    return(math.log(n) / math.log(2))


        
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
    input = sys.stdin.readline
    
main()

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

Solution (Python):
import sys
def main():
    K=int(sys.stdin.readline())
    S=list(sys.stdin.readline().strip())
    if len(S)<=K:print(''.join(S))
    else:print(''.join(S[0: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):
def solve():
    K = int(input())
    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(s)
else:
  print(s[:k]+"...")

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

def actual(k, s) -> str:
    if len(s) <= k:
        return s

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

print(actual(k, s))

Solution (Python):
k = int(input())
n = input()
if k<len(n):
  print(n[:k]+'...')
else:
  print(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)
else:
    print(S[:K] + "...")

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

Solution (Python):
import numpy as np
import scipy as sp
import math

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

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

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

Solution (Python):
k = int(input())
s = str(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[0:k] + '...')
    
else:
    print(s)

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

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

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

Solution (Python):
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:
      print("...")
      break
    print(name,end='')

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

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

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

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

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[:K]+'...')
else:
    print(S)

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

a = len(S)


if a <= 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)
else:
    print(s[0:k]+'...')

Solution (Python):
k = int(input())
s = list(input())
result =[]
for i,letter in enumerate(s):
    if k == 0:
        result.append("...")
        break
    elif i+1 <= k:
        result.append(letter)
    else:
        result.append("...")
        break
print("".join(result))

Solution (Python):
k = int(input())
s = str(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):
import sys
input = sys.stdin.readline

def main():
    k = int(input())
    s = input().rstrip()

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

    print(s)

main()

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

Solution (Python):
import math

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

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

resolve()

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

S_len=len(S)

three_point='...'

if S_len<=K:
  print(S)
else:
  print(S[0:K]+three_point)

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[:K]+'...')

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

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[:k]+"...")
else:
    print(s)

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)
else:
    print('{}...'.format(S[:K]))

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

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

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

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

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):
import sys


def main():
    read = lambda: sys.stdin.readline().rstrip()
    
    
    K = int(read())
    S = read()
    print(S[:K] + '...' if len(S) > K else S)
 
if __name__ == "__main__":
    main()

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 K>=len(S):
    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):
def main():
  if 'get_ipython' in globals(): 
    
    k = 7
    s = "nikoandsolstice"

  else:
    
    
    

    
    

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

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

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

Solution (Python):
def main():
  if 'get_ipython' not in globals(): 
    
    k = int(input())
    s = input()

  else:
    
    k = 7
    s = "nikoandsolstice"

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

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:
    nl=s[0:n]
    print(nl+'...')
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 k >= len(s):
  print(s)

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

  print('...')

Solution (Python):
k = int(input())
s = input().lower()
dots = '...'

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

Solution (Python):


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

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

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

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

Solution (Python):
n = int(input())
s = input()
l = max(len(s)-n, 0)
if(l == 0):
  print(s)
else:
  k = s[:n]
  print(k + "...")

Solution (Python):

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

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(s[:k] + '...')
if __name__ == '__main__':
    main()

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

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

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

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

main()

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

if K >= len(S):
  for i in S:
    print(i,end="")
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=list(input())
if len(S) <= K:
  print("".join(S))
else:
  S=S[0:K]
  print("".join(S)+"...")

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

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

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

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

l = len(s)

if k >= l:
   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):
import sys

sys.setrecursionlimit(10000000)
import os
import math
import bisect
import collections
import itertools
import heapq
import re
import queue



ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)


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


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    K = ii()
    S = iss()

    if len(S) <= K:
        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[: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[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):
N=int(input())
A=input()

B=len(A)
if N>=B:
    print(A)
else:
    for i in range(N):
        print(A[i],end="")
    print("...")

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):
'''
問題文
S: 文字列，英小文字
条件１（長さK以下）→Sをそのまま出力
条件２（長さK以上）→先頭K文字+'...'を出力

アルゴリズム
1. Sの文字数を取得(len(S))
2. Sの文字数とKを比較
2-a. if(len(S)<=K)Sを出力
2-b. if(len(S)>K)先頭K文字+'...'を出力，for文を使って先頭K文字の配列を作り直して'...'を結合し出力．

'''

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

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

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

  ans = S

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

  print(ans)

if __name__ == "__main__":
  main()

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:
    ans = S[:K] + '...'
    print(ans)

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

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

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

Solution (Python):
try:
  k=int(input())
  s=input()
  if(len(s)<=k):
    print(s)
  else:
    ans=''
    ans=s[:k]+'...'
    print(ans)
except EOFError as e:
  pass

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 = len(S)
T = S[:K]
T += "..."

if L <= K:
    print(S)
else:
    print(T)

Solution (Python):
num = int(input())
word = str(input())

if len(word) <= num:
    print(word)
else:
    word_r = word[:num] + '...'
    print(word_r)

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:
  S = S[:K] + '...'
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:
   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:
    print(S[0:K]+'...')

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:
    print(S[0:K] + "...")

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

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

Solution (Python):

"""
Created on Sat May 30 16:59:03 2020

@author: Tofu
"""

def tran(N,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)
    print(ans)

Solution (Python):
num = int(input())
script = input()

if(num >=len(script)):
    print(script)
else:
    print(script[0:num]+'...')

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

if N<=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()
a=int(len(s))
if a<=k:
	print(s)
else:
	print(s[0:k]+'...')

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)
else:
    print(S[0:K] + "...")

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

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

print(S)

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

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

Solution (Python):
def resolve():
    length = int(input())
    moji = input()
    if(len(moji) > length):
        print(moji[0:length] + "...")
    else:
        print(moji)

resolve()

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

Solution (Python):
num = int(input())
word = (input())


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

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

l=len(S)
if l<=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):
  S = S[0:K] + '...'
print(S)

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

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

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

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

Solution (Python):
import sys,bisect,string,math,time,functools,random,fractions
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
from itertools import permutations,combinations,groupby
rep=range
def Golf():n,*t=map(int,open(0).read().split())
def I():return int(input())
def S_():return input()
def IS():return input().split()
def LS():return [i for i in input().split()]
def LI():return [int(i) for i in input().split()]
def LI_():return [int(i)-1 for i in input().split()]
def NI(n):return [int(input()) for i in range(n)]
def NI_(n):return [int(input())-1 for i in range(n)]
def StoLI():return [ord(i)-97 for i in input()]
def ItoS(n):return chr(n+97)
def LtoS(ls):return ''.join([chr(i+97) for i in ls])
def RA():return map(int,open(0).read().split())
def GI(V,E,ls=None,Directed=False,index=1):
    org_inp=[];g=[[] for i in range(V)]
    FromStdin=True if ls==None else False
    for i in range(E):
        if FromStdin:
            inp=LI()
            org_inp.append(inp)
        else:
            inp=ls[i]
        if len(inp)==2:
            a,b=inp;c=1
        else:
            a,b,c=inp
        if index==1:a-=1;b-=1
        aa=(a,c);bb=(b,c);g[a].append(bb)
        if not Directed:g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'

    mp=[boundary]*(w+2);found={}
    for i in range(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[boundary]+[mp_def[j] for j in s]+[boundary]
    mp+=[boundary]*(w+2)
    return h+2,w+2,mp,found
def TI(n):return GI(n,n-1)
def accum(ls):
    rt=[0]
    for i in ls:rt+=[rt[-1]+i]
    return rt
def bit_combination(n,base=2):
    rt=[]
    for tb in range(base**n):s=[tb//(base**bt)%base for bt in range(n)];rt+=[s]
    return rt
def gcd(x,y):
    if y==0:return x
    if x%y==0:return y
    while x%y!=0:x,y=y,x%y
    return y
def show(*inp,end='\n'):
    if show_flg:print(*inp,end=end)
 
YN=['YES','NO'];Yn=['Yes','No']
mo=10**9+7
inf=float('inf')
FourNb=[(-1,0),(1,0),(0,1),(0,-1)];EightNb=[(-1,0),(1,0),(0,1),(0,-1),(1,1),(-1,-1),(1,-1),(-1,1)];compas=dict(zip('WENS',FourNb));cursol=dict(zip('LRUD',FourNb))
l_alp=string.ascii_lowercase

read=sys.stdin.buffer.read
readline=sys.stdin.buffer.readline
input=lambda: sys.stdin.readline().rstrip()


show_flg=False
show_flg=True
ans=0



k=n=I()
s=input()

for i in range(n):
    0

print(s[:k]+'...'*(len(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:
    print(S[:K] + '...')

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

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() 

length_S = len(S)

if length_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[0:K] + '...')
else:
    print(S)

Solution (Python):
K = int(input())
S = []
S = str(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):
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[:N] + "...")

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 = str(input())
if len(S) <= K:
    print(S)
else:
    print(S[:K] + '...')

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    k = I()
    s = S()
    if len(s) > k:
        return s[:k] + "..."

    return s

print(main())

Solution (Python):


n = int(input())
s = input()

s_length = len(s)

if s_length <= n:
    print(s)

else:
    print(s[0:n] + '...')

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

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

Solution (Python):

import sys


def solve(K: int, S: str):
    if len(S) <= K:
        return S
    else:
        return S[:K] + '...'



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    K = int(next(tokens))  
    S = next(tokens)  
    print(solve(K, S))


if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
s=input()
if(n>=len(s)): print(s)
else: print(s[: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()
print(S) if len(S) <= K else print(S[:K] + "...")

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

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

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

if limit < len(string):
    string = string[:limit] + '...'

print(string)

Solution (Python):
K=int(input())
if K>=1 and K<=100:
    S=input()
    S_len=len(S)
    if S.islower() and S_len>=1 and S_len<=100:
        if S_len<=K: print(S)
        else: print(str(S)[:K] + "...")              
    else: print("Sは文字数が1以上100以下であり、全て小文字である必要があります")
else: print("Kは1以上100以下の整数")

Solution (Python):
def cut_string(S,K):
    if len(S) > K:
        return S[:K] + "..."
    return S

K = int(input())
S = input()
print(cut_string(S,K))

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

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

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[:K] + "...")
else :
  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 k >= len(s):
  print(s)
else:
  print(s[:k] + "...")

Solution (Python):

import sys, os, re
from pprint import pprint

k = int(sys.stdin.readline().strip())
s = sys.stdin.readline().strip()

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().strip()

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[:K]+"...")

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

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

if 0 < K < 101 and 0 < len(S) < 101:
    if len(S) <= K:
        print(S)
    else:
        print(S[:K] + "...") 
else:
    print("Try again with K and length of S between 1 and 100 ")

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

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

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

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[:n]+"...")
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()

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

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[0:k]+"...")
else:
  print(s)

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

Solution (Python):



import sys
if sys.version_info[0]<3: input=raw_input

class StandardInput:

    def stdin_string(self):
        self.s=str(input().rstrip())
        return self.s

    def stdin_integer(self):
        self.n=int(input().rstrip())
        return self.n

    def stdin_array(self):
        self.arr=input().rstrip().split()
        return self.arr

    def stdin_integer_array(self):
        self.arr=list(map(int,input().rstrip().split()))
        return self.arr

def test(k,s):
    if len(s) > k:
        return s[:k]+'...'
    else:
        return s

def main():
    obj=StandardInput()
    k=obj.stdin_integer()
    s=obj.stdin_string()
    print(test(k,s))
        
if __name__ == '__main__':
    main()

Solution (Python):
K = int(input())
S = input()
for i ,s in enumerate(S):
  if i == K:
    print('...')
    break
  print(s, end='')

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=input()
if len(s)>k:
    print(s[:k]+'...')
else:
    print(s)

Solution (Python):
K=int(input())
S=input();
i=0;
if(K<len(S)):
    for ch in S:
        print(ch,end="")
        i+=1
        if(i>=K):
            break
    print("...")
else:
    print(S)

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:
    print(S[0:K]+"...")