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


if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

Solution (Python):
import sys
from io import StringIO
import unittest

def resolve():

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

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

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """7
nikoandsolstice"""
        output = """nikoand..."""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """40
ferelibenterhominesidquodvoluntcredunt"""
        output = """ferelibenterhominesidquodvoluntcredunt"""
        self.assertIO(input, output)

if __name__ == "__main__":
    
    resolve()

Solution (Python):
max_letter = int(input())
letter_crowd = input()
letter_length = len(letter_crowd)

if max_letter >= letter_length:
    print(letter_crowd)

else:
    print(letter_crowd[:max_letter] + '...')

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

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

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

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

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

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

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

Solution (Python):
i = input()
i2 = input()

l2 = list(i2)
if(len(l2) <= int(i)):
  print(i2)
else:
  print("".join(l2[0:int(i)])+'...')

Solution (Python):
n =int( input().rstrip() )
s = input().rstrip()
L = len(s)

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

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

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()
words = len(S)

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

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

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

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

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

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

Solution (Python):
k,s=open(0)
k=int(k)
print(s[:k]+'...'*(len(s)-1>k))

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

Solution (Python):
'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)


k = int(input())
str = input()
len = len(str)

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

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


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

Solution (Python):
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

def main():
    k = ni()
    s = ns()

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


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

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

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

Solution (Python):
from sys import stdin

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

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):
i = [input() for i in range(2)]
K = i[0]
S = i[1]
S_length = len(S)
if int(S_length) <= int(K):
    print(S)
else:
	print(S[:int(K)] + "...")

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

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

Solution (Python):
import sys

K = int(sys.stdin.readline().rstrip())
S = sys.stdin.readline().rstrip()
if len(S) > K:
    print('{}...'.format(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[: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):
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[: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().strip())
n = input().strip()
print(n if len(n) <= k else n[: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(list(s)) > k:
    print(s[:k] + "...")
else:
    print(s)

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

if len(list(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):
num=int(input())
str=input()
if(len(str)<=num):
  print(str)
else:
  print(str[0:num]+"...")

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

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

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

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

Solution (Python):


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    K = read_int()
    S = input().strip()
    if len(S) <= K:
        return S
    return S[:K]+'...'


if __name__ == '__main__':
    print(solve())

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

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

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

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

print(answer)

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):
def main():
    k = int(input())
    s = input()
    ans = solve(k, s)
    print(ans)


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


if __name__ == '__main__':
    main()

Solution (Python):

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

Solution (Python):
k=int(input())
S=str(input())
l=len(S)
if l<=k:
	print(S)
else:
	am=[S[i] for i in range(k)]
	am.append("...")
	an="".join(str(i) for i in am)
	print(an)

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

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

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

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):
n=int(input())
chara=input()
nc=len(chara)

if n>=nc:
  print(chara)
else:	
  print(chara[0:n]+"...")

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

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):
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:
    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 solve(string):
    k, s = string.split()
    k = int(k)
    return s if len(s) <= k else s[:k] + "..."


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

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

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

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

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

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

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

Solution (Python):



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

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

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

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

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

Solution (Python):

import sys,pprint

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

if len(S) > K:
    print("{0}{1}".format(S[0:K],'...'))
else:
    print(S)

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

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

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

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

Solution (Python):
def main():
    import sys
    length = int(sys.stdin.readline())
    string = sys.stdin.readline().strip()

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

if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
m=int(input(""))
n=input("")

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

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

Solution (Python):
K = int(input())
S = input()
s = ""
for x in range(min(len(S),K)):
  s += S[x] 
if len(S) > K:
   print(s + "...")
else:
   print(s)

Solution (Python):
from collections import defaultdict as dd

def ri():
    return int(input())

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

def rl2():
    return list(rl())

s = ri()
k = input()

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

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

add="..."

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

print(ans)

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

ans = S

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

print(ans)

Solution (Python):
def solve(K,S):
    return "".join(S) if(len(S) <= K) else "".join(S[:K]) + "..."
        
    return
def main():
    K = int(input())
    S = list(input())
    
    print(solve(K,S))

if __name__ == "__main__":
    main()

Solution (Python):
K = int(input())
S = str(input())
if len(S) <= K :
    print(S)
else:
    a = S[:K]
    print("%s..." % 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 k >= len(s):
    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()
b = int(len(s)) 
if(k < b):
  for i in range(k):
    print(s[i],end ="")
  print("...")
else:
  print(s)

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

Solution (Python):
K = int(input())
S = input()
T = ''
if len(S) <= K:
    print(S)
else:
    for k in range(K):
        T += S[k]
    print('{}{}'.format(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 K >= len(S):
    print(S)
else:
    print(S[:K]+"...")

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

if 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):
n = int(input())
s = input()

if len(s) > n:
    print(s[:n] + '.'*3)
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):
import sys
def input(): return sys.stdin.readline().rstrip()
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[0:K] + "...")

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

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

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

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

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

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

print(S)

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

Solution (Python):
inputk = input()
k = int(inputk)
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):
import sys
K = int(sys.stdin.readline().rstrip())
S = list(sys.stdin.readline().rstrip())
if K >= len(S):
    print(''.join(S))
    
else:
    s = ''.join(S[:K])
    print(f'{s}...')

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

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

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

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

Solution (Python):
from collections import defaultdict, deque
import sys
import heapq
import bisect
import itertools
import queue
import copy
import time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7

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

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

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

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

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

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

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

Solution (Python):
from sys import stdin, stdout
from collections import deque, defaultdict
import math as m

rl = lambda: stdin.readline()
rll = lambda: stdin.readline().split()
rli = lambda: map(int, stdin.readline().split())

INF, NINF = float('inf'), float('-inf')

def main():
	k = int(rl())
	s = rll()[0]
	if len(s) > k:
		print("".join([s[:k], "..."]))
	else:
		print(s)
	stdout.close()

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

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

aa = []

if len(S) <= K:
  print(S)
else:
  for x in range(K):
    aa.append(S[x])
  print("".join(aa) + "...", sep = "")

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

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

Solution (Python):

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

Solution (Python):


ipnl = lambda n: [int(input()) for _ in range(n)]
inp = lambda :int(input())
ip = lambda :[int(w) for w in input().split()]

k = inp()
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):
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()
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] + "...")
elif (len(S)<=K):
  print(S)
else:
  print("Error")

Solution (Python):
seigen = int(input())
word = input()
mojisuu = len(word)
mojiretu = list(word)
tansyuku = ""

if mojisuu > seigen:
    mojiretu = list(word)
    for i in range(seigen):
        tansyuku += mojiretu[i]
    tansyuku += "..."
    print(tansyuku)
else:
    print(word)

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

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

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

moji(S,K)

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=str(input())
t=''
t+=s[0:k]
if len(s)>k:
  t+='...'
print(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()
N = len(S)
if N <= 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):
ii = lambda:int(input())
mi = lambda:list(map(int,input().split()))
ix = lambda x:list(input() for _ in range(x))
mix = lambda x:list(mi() for _ in range(x))
iix = lambda x:list(int(input()) for _ in range(x))

def main(k,s):
    if len(s) <= k : return s
    return s[:k]+"..."

def resolve():
    k = ii()
    s = input()
    print(main(k,s))

if __name__ == "__main__":
    resolve()

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

a = len(s)
b = ''

if a <= k:
    print(s)
else:
    for i in range(k):
        b += s[i]
    b += '...'
    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()
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()
lens = len(s)

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

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

print(ans)

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

Solution (Python):


import sys

input = iter(sys.stdin.readlines()).next

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

   return 0

if __name__ == '__main__':
   sys.setrecursionlimit(10000)
   main()

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

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):
K = int(input())
S = input()
if len(S) <= K:
	print(S)
elif len(S) > K:
    print(S[0:K]+"...")

Solution (Python):
import sys
def input():return sys.stdin.readline()[:-1]
def N(): return int(input())
def NM():return map(int,input().split())
def L():return list(NM())
def LN(n):return [N() for i in range(n)]
def LL(n):return [L() for i in range(n)]
def YesNo(x):print("Yes")if x==True else print("No")
k=N()
s=input()
if len(s)<=k:
    print(s)
else:
    print(s[:k]+"...")

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

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

Sl = list(S)

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

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

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

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

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

print(s)

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

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

if len(strings) <= length:
    print(strings)
else:
    print(f"{strings[0:length]}...")

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 (n := 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()

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

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