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

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

Solution (Python):
k = int(input())
S = input()
l = len(S)
asn = ''

if l <= k:
  ans = S
else:
  ans = S[:k] + '...'
print(ans)

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

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

Solution (Python):
if __name__ == '__main__':
    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[0:k] + '...')
resolve()

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

inputLine = input()

print(inputLine[0 : numTest] + '...' if len(inputLine) > numTest else inputLine)

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

print(S[:K]+int(len(S)>K)*"...")

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

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

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

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

if K < len(S):
    print(f'{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 :
    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)
else:
    print(s[:k] + "...")

Solution (Python):

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


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()
a=len(S)
if a<=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):
import sys
import itertools
import numpy as np
from collections import Counter

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

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

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

Solution (Python):


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




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

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

Solution (Python):
n = int(input())
l = list(input())
if len(l) <= n:
    print("".join(l))
elif len(l) > n:
    del l[n:]
    print("".join(l) + "...")

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

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

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

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

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

Solution (Python):


import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        
        
        lines.append(input())
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

   
    (k, ) = [int(e) for e in lines[0].split(' ')]
    s = lines[1]

    return (k, s)


def solve(k, s):

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

    


def main():
    
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

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

Solution (Python):















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

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

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

Solution (Python):
n=int(input())
s=list(str(input()))
l=[]
if(n>=len(s)):
    print("".join(s))
elif(n!=len(s)):
    for i in range(n):
        l.append(s[i])
    for i in range(3):
        l.append(".")
    print("".join(l))

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

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

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

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

Solution (Python):
x = int(input())
y = list(input())

if len(y) <= x:
  print(''.join(y))
else:
  print(''.join(y[:x]) + '...')

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

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

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

if __name__ == '__main__':
    resolve()

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

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

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

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip()
from math import floor,ceil,sqrt,factorial,log
from heapq import heapify, heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from decimal import Decimal
inf = float('inf')
mod = 1000000007

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

else:
    print(S[0:K]+'...')

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

Solution (Python):
if __name__ == "__main__":
	length = int(input().strip())
	string = input().strip()
	if len(string) <= length:
		print(string)
	elif len(string) > length:
		print(string[:length], end = '')
		print("...")

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

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

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

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

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

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

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

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

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

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

Solution (Python):
def main():
    import sys
    
    k = int(input())
    s = input()
    if len(s) > k:
        s = s[:k] + '...'
    print(s)

if __name__ == '__main__':
    main()

Solution (Python):


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


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


print(result)

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

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

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

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

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

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

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

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

print(result)

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

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

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

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

for i in ans:
    print(i, end='')
print()

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

if len(S) <= K:
    print(S)
    exit()
else:
    for i in range(K):
        A.append(S[i])

A.append('...')
print(''.join(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('')

p=[]

for a in s:
    p.append(a)

if len(p)<=k:
    print(s)
else:
    q=''
    for a in range(k):
        q=q+p[a]
    
    q=q+'...'

    print(q)

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

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

Solution (Python):

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

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

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

Solution (Python):
def readinput():
    k=int(input())
    s=input()
    return k,s

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

if __name__=='__main__':
    k,s=readinput()
    ans=main(k,s)
    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:
    ans = s[0:k] + str('...')
    print(ans)

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

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

Solution (Python):
l=int(input())
a=input()
b=list(a)

x=len(b)
if x <= l:
    print(a)
else:
    a=b[0:l]
    str_a="".join(a)
    print(str_a+'...')

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

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

Solution (Python):

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

def main():
    mod=10**9+7
    K=I()
    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[0:k]+"...")
else:
    print(s)

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

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

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

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

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

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

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

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

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


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

Solution (Python):

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

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

Solution (Python):
import sys
def I(): return int(sys.stdin.readline().rstrip())
def S(): return sys.stdin.readline().rstrip()

k = I()
s = S()

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

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

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

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

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

Solution (Python):


import sys
readline = sys.stdin.readline
read = sys.stdin.read




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

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


if __name__ == '__main__':
  main()

Solution (Python):
import math
import string
import collections
from collections import Counter


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


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor



dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
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()
count = 0
for s in S:
    if count == K:
        print('...')
        break
    print(s,end='')
    count += 1

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

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

n=len(s)
if(n<=k):
    print(s)
else:
    l=s[:k]+"..."
    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:
    for i in range(len(s)):
        if i < k:
            print(s[i], end='')
        else:
            print('...')
            exit()

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

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

Solution (Python):
import sys
import numpy as np
import math
from collections import deque 
from functools import reduce



k = int(input())

s = input()

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

Solution (Python):
ls = []
for i in range(2):
    ls.append(input())
if len(ls[1]) > int(ls[0]):
    ans = ls[1][0:int(ls[0])]
    ans = ans + '...'
    print(ans)
else:
    print(ls[1])

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

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

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

Solution (Python):
def resolver():
    pass


def main():
    K = int(input())
    S = input()
    
    if len(S) <= K:
        print(S)
    else:
        print(f"{S[:K]}...")


    resolver()


if __name__ == '__main__':
    main()

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

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

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

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

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

result = ""

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

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

if len(s) <= k:
  print(''.join(s))

else:
  del s[k:]
  s.append('...')
  print(''.join(s))

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

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

print(s)

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

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[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("{}{}".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):
import sys
N = int(sys.stdin.readline().rstrip())
S = sys.stdin.readline().rstrip()

if S == S[:N]:
    print(S[:N])
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[:k], end='')
if len(s) > k:
    print('...')

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

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

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

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

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

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

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

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

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(''.join(list(S)[:K]+['.','.','.']))

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

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

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

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

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

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

Solution (Python):

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

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

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 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
sys.setrecursionlimit(10**7)
def input(): return sys.stdin.readline().rstrip()

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

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

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

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

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

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

if __name__ == "__main__":
    main()

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

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

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

if len(S) <= K:
    print(S)
else:
    print(f"{S[:K]}...")

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

n=len(s)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):

K = int(input())

S = input()

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

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

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

Solution (Python):

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

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, S = int(input()), input()



if len(S) <= K:
  print(S)
elif len(S) > K:
  print("{}...".format(S[:K]))

Solution (Python):
import sys


def input():
    return sys.stdin.readline()[:-1]


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

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

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

Solution (Python):
K = int(input())
S = list(input())
ans = ['...']

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

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

Solution (Python):

printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True 
BIG = 10**18
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

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

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

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

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

Solution (Python):
k=int(input())
s=input()
c=len(s)
a=list(s)
List=[]


if c<=k:
    print(s)
else:
    for i in range(k):
        List.append(a[i])
    List.append('...')
    print(*List,sep='')

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

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

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

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

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

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

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

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

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

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

def calculate(k,s):
    ss = list(S)

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

calculate(K,S)

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