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 = str(input())
S_K = S[0:K]
dot = '...'


if len(S) <= K :
    print(S)
else :
    print(S_K + dot)

Solution (Python):
def solve(K,S):
  if len(S) <= K:
    return S
  else:
    return (S[:K] + "...")

K = int(input())
S = input()
ans = solve(K,S)
print(ans)

Solution (Python):
k = int(input())
s = input()
 
if len(s) > k:
  print("{}...".format(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
import itertools

import time
import math
 
sys.setrecursionlimit(10 ** 7)
 
from collections import defaultdict
 
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):
k = int(input())
s = input()

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

Solution (Python):


import copy
import random
import bisect 
import fractions 
import math
import sys
import collections
from decimal import Decimal 

mod = 10**9+7
sys.setrecursionlimit(mod) 

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

K = int(input())
S = str(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("{}...".format(S[:K]))
else:
    print(S)

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

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

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

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

Solution (Python):
input_num = int(input())
input_str = input()

if input_num < len(input_str):
	print(input_str[0:input_num] + '...')
else:
	print(input_str)

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:
	st = []
	for i in range(n):
		st.append(s[i])
	st.append("...")
	print("".join(st))

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

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

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()
cnt = '...'

if len(S) <= K:
    print(S)
else:
    print(S[:K] + str(cnt))

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

if len(S) <= K:
    print(S)
elif len(S) > K:
    ans = S[0]
    for i in range(1,K):
        ans += S[i]

    for j in range(3):
        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 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[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()
n=len(s)

if n<=k:
    print(s)
else:
    print(s[:k],end='')
    print('.'*3)

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

deffirence = len(S) - K

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

Solution (Python):
"""
int 
float 


for name in fruits: 
    print(name)
    

list0 = [] 
list0 = [1,2,3,4] 
list0 = [0]*10 
list1= [i for i in range(10)] 
list1 = list(map(int, input().split()))　
number=[int(input()) for i in range(int(input()))] 
list1 = list1 + [6, 7, 8] 
list2.append(34) 
list.insert(3,10) 
len(list4) 
max(sa) 
list5.count(2) 
list1.sort() 
list1.sort(reverse=True)  
set(list1) 

abs(a) 
max(a,b) min(a,b) 
text1 = text1.replace("34","test") 

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

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








main()

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 k < len(s):
    print(s[:k%len(s)]+"...")
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()
import numpy as np
p=list(s)
l=len(p)
if l<=k:
  print(s)
else:
  arr=np.array(p)
  arr=arr[0:k]
  print(''.join(list(arr))+'...')

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

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

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

if len(s) > k:
    print(s[: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=input()
if len(S)<=K:
    print(S)
else:
    T=[]
    S=list(S)
    for i in range(K):
        T.append(S[i])
        K="".join(T)
    print(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 k >= int(len(s)):
    print(s)
else:
    print(str(s[0:k]) + "...")

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

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

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:
    str_k = ''
    for i in range(k):
        str_k = str_k + s[i]
    print(str_k + '...')

Solution (Python):



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

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

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

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

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

s_len = len(S)

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

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

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

Solution (Python):
def triple_dot():
    k = int(input())
    s = input()
    len_s =len(s)
    result_s = []
    
    if len_s > k:
        for i in range(k):
            result_s.append(s[i])
        print("".join(result_s) + "...")
    else:
        print("".join(s))
triple_dot()

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

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

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

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

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

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

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

if len(b) > a:
    print(b[:a]+'...')
else:
    print(b)

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

Solution (Python):

"""AtCoder Beginner Contest 168: B - ... (Triple Dots)
https://atcoder.jp/contests/abc168/tasks/abc168_b
"""


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

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


if __name__ == '__main__':
    main()

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

ans = s
if l > k:
    ans = f'{s[:k]}...'

print(ans)

Solution (Python):
import numpy as np
import sys



def xnxn(n=0, flag="v"):
    """
    args:
        int n: a number of lows to read
    example:
        input   1
        retrun  1

        input   1 2 3
        return  [1,2,3]
        input   1 2 3
                4 
        return  [[1,2,3],
                [4]]
    """
    if n == 0:
        temp = list(map(int, input().split()))
        if len(temp) == 1:
            if flag == "l":
                return temp
            else:
                return temp[0]
        elif len(temp) > 1:
            return temp
    else:
        temp = [list(map(int, input().split())) for _ in range(n)]
        return temp


def sp_xnxn(n=0):
    """
    args:
        int n: a number of lows to read
    example
        input   1
        retrun  [1]

        input   123
        return  [1,2,3]

        input   123
                4 
        return  [[1,2,3],
                [4]]
    """
    if n == 0:
        return [int(k) for k in xsxs()]
    else:
        return [[int(k) for k in xsxs()] for _ in range(n)]


def xsxs(n=0):
    """
    args:
        int n: a number of lows to read 
    example:
        input   AA
        retrun  AA

        input   A BBB CC
        return  ["A","BBB","CC"]

        input   A BB CCC
                D
        return  [["A","BBB","CC"],
                ["D"]]
    """
    if n == 0:
        temp = list(input().split())
        if len(temp) == 1:
            return temp[0]
        elif len(temp) > 1:
            return temp
    else:
        return [list(input().split()) for _ in range(n)]


def sp_xsxs(n=0):
    """
    args:
        int n: a number of lows to read 
        example:
            input   A
            retrun  ["A"]

            input   ABC
            return  ["A","B","C"]

            input   ABC
                    D
            return  [["A","B","C"],
                    ["D"]]
    """
    if n == 0:
        return [s for s in xsxs()]
    else:
        return [[s for s in xsxs()] for _ in range(n)]


k = xnxn()
s = xsxs()

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):
a = int(input())
b = input()
c = len(b)
if a>=c:
    print(b)
else:
    d = b[0:a]+"..."
    print(d)

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()
l=[]
t=len(s)
if t<=k:
    print(s)
    exit()
else:
    for i in range(k):
        a=s[i]
        l.append(a)
ans=''.join(l)
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()
length = len(s)
if length <= k:
    print(s)
else:
    print(s[:k]+'...')

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

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

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

if __name__ == "__main__":
    main()

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

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

Solution (Python):
def method():
  max_lenght = int(input())
  string = str(input())

  if len(string) <= max_lenght:
    return string
  else:
    shorten = string[0:(max_lenght)]
    return shorten + '...'

print(method())

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
k = I()
s = S()
if len(s) <= k:
    print(s)
else:
    print(s[0:k] + '...')

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

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

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

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

Solution (Python):

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

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

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


ans = s[:k]
if len(s) > 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()

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

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

s = len(S)

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

Solution (Python):
K = int(input())
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("{}...".format(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):
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 = str(input())

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
K = int(input())
S = 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):
def output(list_str, len):
  for i in range(len):
    print(list_str[i], end="")

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

if len(S) <= K :
  output(S, len(S))
  print()
else:
  output(S, K)
  print("...")

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

for i, s in enumerate(S):
    if(i == K):
        print('...')
        break
    print(s, 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 = 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(s[0:k] + '...')

Solution (Python):
def Triple_Dots():
    K = int(input())
    S = input()
    S_list = list(S)
    output = ''
    if len(S_list) <= K:
        output = S
    else:
        for i in range(0, K):
            output += S_list[i]
        output += "..."
    print(output)
    
Triple_Dots()

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

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

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

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

print(ans)

Solution (Python):
k = int(input())
s = input()
ans = ''
if len(s) <= k:
    print(s)
else:
    for i in s:
        if len(ans) < k:
            ans += i
        else:
            print(ans + '...')
            exit()

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

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

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

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

l = len(S)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import sys
import math
import collections
import heapq
import queue
import itertools
import functools
import operator
import time

readline = sys.stdin.readline
 
IPS = lambda: readline().rstrip()
IP = lambda: int(readline().rstrip())
MP = lambda: map(int, readline().split())
LS = lambda: list(map(int, readline().split()))

def solve():
    for _ in range(1):
        k = IP()
        s = IPS()
        n = len(s)
        if n<=k: print(s)
        else: print(str(s[:k]+"..."))
       
       
if __name__ == "__main__":
    solve()

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

main()

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

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

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


def test():
    
    k = int(input())
    s = input()

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


print(test())

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

Solution (Python):
k=int(input())
s=str(input())
n=int(len(s))
if k<n:
    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):
import sys

N = int(input())
S = input()

if len(S)<=N:
  print(S)
  sys.exit()
  
print(S[0:N]+'...')

Solution (Python):
def b(s: str, k: int) -> str:
    if len(s) <= k:
        return s

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



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

r = b(s, k)
print(r)

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

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

if len(s)<=k:
    print(s)
else:
    ans=s[0]
    for n in range(k-1):
        ans=ans+s[n+1]
    ans=ans+'...'
    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[0: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]+"...")
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()
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())
moji = input()

if len(moji) <= n:
    print(moji)
else:
    print(moji[:n]+'...')

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

Solution (Python):
N = int(input())
lis = list(input())
ans = ""

for id,value in enumerate(lis):
  if id >= N:
    ans += "..."
    break
  else:
    ans += value

print(ans)

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

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

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:
    ans = S
else:
    ans = f"{S[:K]}..."

print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(1000000)
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
K = I()
S = S()

if len(S) <= K:
    print(S)
    sys.exit()
else:
    li = "".join([S[0:K],"..."])
    print(li)

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
sys.setrecursionlimit(1000000)
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
K = I()
S = S()

if len(S) <= K:
    print(S)
    sys.exit()
else:
    li = "".join([S[0:K],"..."])
    print(li)

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

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

Solution (Python):
import numpy as np

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)
    exit()
else:
    print(s[:k], end = "")
    print("...")

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

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

Solution (Python):
k = int(input())
word = input()
word_list = list(word)
leng = len(word_list)
if k >= leng:
    print(word)
else:
    for i in range(k):
        print(word_list[i], end="")
    print("...")

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

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

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

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

Solution (Python):

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

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

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

if len(s) <= a:
    print(s)
else:
    print(s[0:a], end='')
    print("...")

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

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

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

print(ans)

Solution (Python):

k=int(input())

s=list(input())





if len(s) <= k: 
    
    print(''.join(s)) 
else: 
    new_s=s[0:k] 
    new_s.append("...") 
    
    print(''.join(new_s))

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

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

print(ans)

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

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

slist = list(s)
if len(slist) > k:
  l = ''
  for i in range(k):
    l += slist[i]
  print(l + '...')
else:
  print(s)