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

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

Solution (Python):
k=int(input())
s=input()
plus="..."

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

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

lenS = len(S)

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

Solution (Python):
K, S = [input() for i in range(2)]

if len(S)<=int(K):
  print(S)
else:
  print(S[:int(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 = list(input())

if len(s) > k:
    t = s[:k]
    t.append('...')
    print(''.join(t))
else:
    print(''.join(s))

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

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

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

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

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

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

Solution (Python):
K=int(input())
S=input()
l = len(S)
if l > 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()

l_s = len(s)

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

Solution (Python):
def main():
    import sys
    def input():
        return sys.stdin.readline()[:-1]
    K=int(input())
    S=input()
    N=len(S)
    if K>=N:
        print(S)
    else:
        print(S[:K]+"...")

    

        


if __name__ == '__main__':
    main()

Solution (Python):
if __name__ == '__main__':
    num =int(input())
    word = input()
    if len(word)<=num:
        print(word)
    else:
        string = ""
        for i in range(num):
            string+=word[i]
        string += "..."
        print(string)

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

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

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

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

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

Solution (Python):
import sys
from math import log2,floor,ceil,sqrt



Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()
 
def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
INF = 10 ** 18
MOD = 10**9+7

k = int(ri())
s = ri()
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):
if __name__ == "__main__":
    k = int(input())
    s = input()

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

Solution (Python):
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import math
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

K = INT()
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):
count = int(input())
s = input()

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

Solution (Python):
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    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[: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())
if len(s) <= k:
    print("".join(s))
else:
    print("".join((s[:k]+["..."])))

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

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

Solution (Python):

from sys import stdin


def get_result(data):
    K = int(data[0][0])
    S = data[1][0]
    return S if len(S) <= K else S[:K] + "..."


if __name__ == '__main__':
    raw_data = [val.rstrip() for val in stdin.readlines()]
    data = [list(map(str, val.split(' '))) for val in raw_data]
    result = get_result(data)
    print(result)

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

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

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

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

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

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

    print(ans)


if __name__ == '__main__':
    main()

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

Solution (Python):
from sys import stdin
import math
import fractions
from collections import deque
from collections import Counter
import itertools

readline = stdin.buffer.readline

INF = 10 ** 10

K = int(readline())
S = str(input())

if len(S) <= K:
    print(S)
else:
    tmp = "".join([c for c in S[:K]])
    print(tmp + "...")

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

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

Solution (Python):
import sys











 
sys.setrecursionlimit(10**9)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod1=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 MI(): return map(int, inp().strip().split())
def LI(): return list(map(int, inp().strip().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines().strip()]
def LI_(): return [int(x)-1 for x in inp().strip().split()] 
def LF(): return [float(x) for x in inp().strip().split()] 
def LS(): return inp().strip().split() 
def I(): return int(inp().strip()) 
def F(): return float(inp().strip()) 
def S(): return inp().strip() 
def pf(s): return out(s+'\n')
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 modinv(n,p):return pow(n,p-2,p)
def ncr(n,r,p):                      
    t=((fact[n])*((ifact[r]*ifact[n-r])%p))%p
    return t


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



py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange

import os, sys
from io import IOBase, BytesIO

BUFSIZE = 8192
class FastIO(BytesIO):
    newlines = 0
    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0,2), super(FastIO, self).write(s))[0])
        return s
    def read(self):
        while self._fill(): pass
        return super(FastIO,self).read()

    def readline(self):
        while self.newlines == 0:
            s = self._fill(); self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s:self.buffer.write(s.encode('ascii'))
            self.read = lambda:self.buffer.read().decode('ascii')
            self.readline = lambda:self.buffer.readline().decode('ascii')

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

inp = lambda: sys.stdin.readline().rstrip('\r\n')
out = lambda x: sys.stdout.write(x)
flsh= lambda: sys.stdout.flush()

if __name__ == "__main__":
    main()

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

Solution (Python):
K=int(input())
S=input()
if K < len(S):
  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()

text = ""

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

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

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

Solution (Python):
n = int(input())
s = input()
if len(s) <= n:
    print(s)
else:
    print('{0}...'.format(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("")

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

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

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

print(ans)

Solution (Python):
def cin(): 
	return map(int,input().split())

def cino(test=False): 
    if not test:
        return int(input())
    else: 
        return input()

def cina(): 
  return list(map(int,input().split()))

def ssplit(): 
    return list(input().split())

def printlist(l): 
    for i in l:
        print(i,end=" ")

def main():
    a = cino()
    b = cino(True)
    l = len(b)
    
    if l<=a:
        print(b)
    else:
        print(b[:a]+"...")

if __name__=="__main__":
    main()

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 = list(input())

if len(s)<=k:
  print("".join(s))
else:
  print("".join(s[: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[:K], "...", sep='')
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:
    t = s[0:k] + "..."
    print(t)

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

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

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

resolve()

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 : str = input()
    if len(s) <= k:
        print(s)
    else:
        print(s[:k]+"...")
if __name__ == "__main__":
    main()

Solution (Python):
K = int(input())
S = input()
temp = ""
if len(S) > K:
    for i in range(K):
        temp = temp + S[i]
    temp = temp + "..."
    print(temp)
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:
    ans = s[:k]+"..."
    print(ans)

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

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

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

print(S)

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

Solution (Python):

import sys
import collections

sys.setrecursionlimit(10 ** 7)


K = int(input().rstrip())


S = input().rstrip()

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

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

n = len(s)

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

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

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

Solution (Python):
k = int(input())
list_n = input()
lis = [i for i in list_n]
if len(lis) <= k:
    print(list_n)
else:
    print("".join(lis[:k]) + "...")

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

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



resolve()

Solution (Python):

from collections import deque
from operator import itemgetter
from bisect import bisect_left, bisect
import itertools
import sys
import math
import numpy as np
import time
sys.setrecursionlimit(10**6)



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


if __name__ == '__main__':
    main()

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

if len(n) <= k:
    print(n)
else:
    print(n[0: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:
    res = S
else:
    res = S[:K] + "..."

print(res)

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

K = int(input())
S = input().rstrip()

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

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

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

Solution (Python):


from pprint import pprint
from collections import deque, defaultdict
import itertools
import math
import sys

sys.setrecursionlimit(10 ** 6)
INF = float('inf')

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

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

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

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

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

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

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

Solution (Python):
k=int(input())
s=input()
if len(s)>k:
    print(s[:k]+"...")
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)
else:
    print(f'{s[:k]}...')

Solution (Python):
k = int(input())
s = str(input())
if len(s) <= k:
    print(s)
else:
    for i in range(k):
        print(s[i],end="")
    print("...", end="")

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


mozi =""
if int(len(s)) <= k:
    print(s)
    exit()
else:
    for i in range(k):
            mozi = mozi + s[i]

mozi = mozi +"..."

print(mozi)

Solution (Python):


import sys
import math
import time

import collections
from collections import deque
from collections import Counter
import queue
import copy
import bisect
import heapq
import itertools



sys.setrecursionlimit(10**7)







K = int(input())
S = str(input())
s = len(S)

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

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


if __name__ == '__main__':
    main()

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

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

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

nagasa=len(S)

if nagasa<=K:
    print(''.join(S))
else:
    ans=[]
    for n in range(K):
        ans.append(S[n])
    ans.append('...')
    print(''.join(ans))

Solution (Python):
K=int(input())
S=input()
s=list(S)
if len(s)<=K:
    print(S)
else:
    s=s[0:K]+['...']
    for i in s:
        print(i,end='')

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

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

Solution (Python):
b,= map(int, input().split())
a= input()
c= list(a)
if len(c)<=b:
  print(str(a))
else:
  print(str(a[:b])+"...")

Solution (Python):

"""
@author: H_Hoshigi
"""
def main():
    K = int(input())
    S = input()
    answer = ""
    if len(S) <= K:
        answer = S
    else:
        answer = S[:K] + "..."
    print(answer)

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

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

if len(S) <= K:
  print(S)
else:
  print('{}{}'.format(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):
a=int(input())
b=input()
if len(b)<=a:
    print(b)
else:
    print(b[:a]+'...')

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())
s = ''
if len(S) <= K:
  print(S)
else:
  S = list(S)
  for i in range(K):
    s += S[i]
  s += '...'  
  print(s)

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

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

Solution (Python):
import itertools

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

Len=len(S)

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

Solution (Python):
import sys

K = int(sys.stdin.readline().strip())
S = sys.stdin.readline().strip()

ans = ""
for i, char in enumerate(S):
    if i == K:
        ans += "..."
        break
    ans += char

print(ans)

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

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

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

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


main()

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

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

Solution (Python):
def main():
  K = int(input())
  S = str(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):
import sys
import math
import numpy as np
from collections import Counter, defaultdict, deque

input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)


def S():
    return input().rstrip()


def I():
    return int(input())


def MI():
    return map(int, input().split())


inf = float("inf")
mod = 10 ** 9 + 7

k = I()
s = S()

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:
    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):
def main(K, S):
    if len(S) > K:
        answer = S[:K] + '...'
    else:
        answer = S
    print(answer)



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

Solution (Python):
def main():

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

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

if __name__ == '__main__':
    main()

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

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

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

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 k <len(s):
    print(f"{''.join(s[0:k])}...")
else:
    print(''.join(s))

Solution (Python):
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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:
    S_K=S[:K]
    print(S_K+'...')
  
if __name__ == '__main__':
    main()

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

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

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

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

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

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

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], '...', sep='')

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

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

Solution (Python):
def b168(k, s):

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

def main():
    k = int(input())
    s = str(input())
    print(b168(k, s))

if __name__ == '__main__':
    main()

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

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