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

a=len(s)

if k >= a:
  print(s)

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

Solution (Python):

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

a=len(s)

if k >= a:
  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()
ss = list(s)

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

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

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

Solution (Python):
import sys
K = int(sys.stdin.readline())
S = sys.stdin.readline().rstrip()
if len(S) > K:
    print(S[:K] + "...")
else:
    print(S)

Solution (Python):
import sys
K = int(sys.stdin.readline())

S = sys.stdin.readline().rstrip()
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()

l=len(s)

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

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



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
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

k = int(readline())
s = read().rstrip().decode()
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):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline
from collections import defaultdict
from heapq import heappop, heappush

from decimal import *





































def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007




def main():
	K = inputInt()
	S = inputStr()

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





def sunuke(N, K, mod=10**9+7):
	if N < K or K-1 < 0:
		return 0
	else:
		return combination(N-1, K-1, mod)




def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y



def H(n, r, mod=10**9+7):
	
	
    return combination(n+r-1, r, mod)


class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        
        
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv



def dfs(graph,parent,counter,edge):
    stk = []
    stk.append(edge)
    while len(stk) > 0:
        p = stk.pop()
        for e in graph[p]:
            if parent[p] == e:
                continue
            else:
                parent[e] = p
                counter[e] += counter[p]
                stk.append(e)



if __name__ == "__main__":
	main()

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    K = int(rl())
    S = rl().rstrip()
    
    if len(S) <= K:
        print(S)
    else:
        print(S[:K] + '...')


if __name__ == '__main__':
    solve()

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

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

Solution (Python):


def II(): return int(input())
def MII(): return map(int, input().split())
def LII(): return list(map(int, input().split()))

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

Solution (Python):
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left
from functools import reduce
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    k = i_input()
    s = s_input()

    len_s = len(s)

    if len_s <= k:
        print(s)
        exit()

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

    print('...')    

if __name__ == '__main__':
    main()

Solution (Python):
K=int(input())
S=list(map(str,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):

import sys


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



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

if __name__ == '__main__':
    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 = 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(''.join([S[:K], '...']))

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

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

Solution (Python):



def get_input() -> tuple:
    """
    標準入力の取得

    Returns:\n
        tuple: 標準入力
    """
    K = int(input())
    S = input()

    return K, S


def main(K: int, S: str) -> None:
    """
    求解処理.

    Args:\n
        K (int): 整数（1 <= K <= 100）
        S (str): 英子文字からなる文字列（1 <= |S| <= 100）
    """
    """
    文字列の長さで場合分け.
    """
    result = str()
    if len(S) <= K:
        result = S
    else:
        result = S[:K] + "..."

    
    print(result)


if __name__ == "__main__":
    K, S = get_input()
    main(K, S)

Solution (Python):
import sys

k = int(sys.stdin.readline())
s = sys.stdin.readline().split()[0]

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

print(s)

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

if K >= len(S) :
  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):
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H):
    '''
    H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) 
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_matrix(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    


MOD = 10**9 + 7
INF = 2**31  

from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  

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

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

Solution (Python):
import math
import sys

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

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

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

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

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

k=int(input().rstrip())
s=input().rstrip()
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)

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

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

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

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

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

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

Solution (Python):
k = input()
s = input()
s1 = [i for i in s]
s2 = len(s1)
s3 = []
if int(s2) <= int(k):
  print(s)
else:
  for i in range(int(k)):
    s3.append(s1[i])
  s3.insert(int(k),"...")
  StrA = "".join(s3)
  print(StrA)

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

leng = len(S)


if(leng > K):
  word = S[0:K] + '...'
else:
  word = S

print(word)

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

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

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

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


if __name__ == '__main__':
    main()

Solution (Python):
k=int(input());s=input();l=len(s)
print(s[0:min(k,l)]+"."*3*(k<l))

Solution (Python):
import sys

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

K = int(readline())
S = read().rstrip().decode()

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

K = int(K)

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

elif (len(S) > K):
    M = S[:K]
    print(M + "...")

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

Solution (Python):
import sys

if __name__ == '__main__':
    lines = []
    for line in sys.stdin:
        lines.append(line.rstrip('\r\n'))

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

Solution (Python):
def resolve():
    import sys

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

    k = int(input())
    s = input()
    length = len(s)

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


resolve()

Solution (Python):


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

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

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

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

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

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

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

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

if S.islower() and len(S) <= K:
    print(S)
elif S.islower() and len(S) >= K:
    print(f"{S[0:K]}{'...'}")

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

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

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

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

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

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

Solution (Python):
def string_k(k, str):
    if len(str) <= k:
        print(str)
    else:
        print(str[0:k]+"...")

k = int(input())
str = input()
string_k(k,str)

Solution (Python):

k = int(input())
s = input()
n = len(s)
if  n <= k:
    print(s)
elif  n != k:
    print(s[:k]+'...')

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

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

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

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

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

Solution (Python):
from sys import stdin

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

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

Solution (Python):
K=int(input())
S=list(input())
if len(S)>K:
  answer=[]
  for i in range(K):
    answer.append(S[i])
  answer.append('...')
  s=''
  for i in range(len(answer)):
    s+=answer[i]
  print(s)
else:
  g=''
  for i in range(len(S)):
    g+=S[i]
  print(g)

Solution (Python):
K = input()
S = input()
ans = ""
if len(str(S)) <= int(K):
    print(S)
else:
    for i in range(int(K)):
        ans += S[i]
    print(str(ans) + "...")

Solution (Python):
from sys import stdin

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

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

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

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

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

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

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

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

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

Solution (Python):
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))



K = I()
S = str(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(f"{s[:k]}...")

if __name__ == "__main__":
    main()

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

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

Solution (Python):



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




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

Solution (Python):
K = int(input())
S = str(input().lower())
if len(S) <= K:
    print(S)
elif len(S) > K:
    stol = list(S)
    stol[K] = "..."
    Cutlist = stol[0:K+1]
    LtoS = ''.join(map(str, Cutlist))
    print(LtoS)

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

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

Solution (Python):
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(IN())
mod=1000000007



def main():
	k = int(input())
	
	s = input()
	
	if k >= len(s):
		print(s)
		return 
	ret = s[:k]+'...'
	print(ret)
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

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

Solution (Python):
K=int(input())
S=input()
p=S[:K]
if(len(S)<=K):
  print(S)
else:
  q=''.join((p,"..."))
  print(q)

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

Solution (Python):



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

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

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

Solution (Python):
import sys
import numpy as np


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

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

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

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

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

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

Solution (Python):
import sys

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

list = []

if len(s) <= k:
    print(s)
    sys.exit()
    
for i in range (k):
    list.append(s[i])

list = "".join(list)
print(list +"...")

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

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

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

if K >= len(S):
    print(''.join(S))

if K < len(S):
    print(''.join(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

a=int(stdin.readline())
b=stdin.readline()

if len(b)-1<=a:
    print(b)
else:
    b=b[:a]
    b=b+'...'
    print(b)

Solution (Python):
K = int(input())
S = input()
list_s =list(S)
T = len(list_s)
if T > K:
    for i in range(K,T):
        del list_s[K]
    S =""
    for i in range(K):
        S += list_s[i]
    S += '...'
print(S)

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



def linput(_t=int):
    return list(map(_t, input().split()))

def gcd(n,m):
    while m: n,m = m, n%m
    return n

def lcm(n,m): return n*m//gcd(n,m)

def main():

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

    
    

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

    print(res)
    



main()

Solution (Python):

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

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

Solution (Python):
import sys








 
def ri():
    return list(map(int, input().split()))
def rs():
    return list(input().strip())
 
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:
  s = s[:k] + "..."
  print(s)

Solution (Python):


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

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

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

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

Solution (Python):
def i_input(): return int(input())
def s_input(): return input()

def main():
    k = i_input()
    s = s_input()

    len_s = len(s)

    if len_s <= k:
        print(s)
        exit()

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

    print('...')    

if __name__ == '__main__':
    main()

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

N = len(S)

A = str(S)[0 : K]

if N <= K:
    print(S)
else:
    print(A + "...")

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

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

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

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

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


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

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

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

Solution (Python):
def i_input(): return int(input())
def s_input(): return input()

def main():
    k = i_input()
    s = s_input()

    len_s = len(s)

    if len_s <= k:
        print(s)
        exit()

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

    print('...')    

if __name__ == '__main__':
    main()

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

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

Solution (Python):

def main():
    N = int(input())
    l = input()
    ll = list(l)
    if len(l) <= N:
        print(l)
    else:
        kl = ''.join(ll[:N])
        print(kl+"...")
if __name__ == "__main__":
    main()

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

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

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

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

else:
    print(s)

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

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

Solution (Python):
x = [input() for i in range(2)]

n = x[0]
word = x[1]


letter_num = len(word)


word_num = list(word)

if letter_num <= int(n):
    print(word)

else:
    words = list(word)
    l = list()
    m = 0
    for i in range (int(n)):
        l.append(words[int(m)])
        m += 1
        
    l.append("...")
    
    answer = " "
    
    for j in l:
        answer += j
    print(answer)

Solution (Python):


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

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

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

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

l = len(s)

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

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

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

if len(z) > a: 
  print(z[0:a] + "...")
else:
  print(z)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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