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

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

Solution (Python):
"""    Arnab Chanda    """

from collections import defaultdict, deque
from itertools import permutations
from sys import stdin,stdout
from bisect import bisect_left, bisect_right
from copy import deepcopy
import heapq

int_input=lambda : int(stdin.readline())
string_input=lambda : stdin.readline().split()
multi_int_input =lambda : map(int, stdin.readline().split())
multi_input = lambda : stdin.readline().split()
list_input=lambda : list(map(int,stdin.readline().split()))
string_list_input=lambda: list(string_input())
MOD = pow(10,9)+7


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

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

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

Solution (Python):
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush

from collections import defaultdict as dd, deque, Counter as C








mod = pow(10, 9) + 7
mod2 = 998244353


def data(): return sys.stdin.readline().strip()


def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var)) + end)


def l(): return list(sp())


def sl(): return list(ssp())


def sp(): return map(int, data().split())


def ssp(): return map(str, data().split())


def l1d(n, val=0): return [val for i in range(n)]


def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]


k = int(data())
s = data()
answer = []
t = True
for i in range(len(s)):
    if i + 1 > k:
        t = False
        break
    answer.append(s[i])
if not t:
    answer.append("...")
out(''.join(answer))

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


main()

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

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

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

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

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

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

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

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

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

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

Solution (Python):


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

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


def read():
    K = int(input().strip())
    S = input().strip()
    return K, S


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


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))

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

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

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

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

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

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

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


if __name__ == '__main__':
    main()

Solution (Python):
import math

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

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

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

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

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

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

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

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

Solution (Python):
import sys
from math import factorial
from collections import Counter
from fractions import Fraction
import heapq, bisect, fractions
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
MOD = 10**9 + 7

k = INT()
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))
    exit()
ans = S[0:K]+[".",".","."]
print("".join(ans))

Solution (Python):



import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    K = i2n()
    S = i2s()
    if len(S) <= K:
        print(S)
    else:
        print(S[:K] + '...')
    return

main()

Solution (Python):
k = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    for i in range(k):
        print(s[i],end="")
    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):
import sys
from io import StringIO
import unittest


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

    
    

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

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """7
nikoandsolstice"""
        output = """nikoand..."""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """40
ferelibenterhominesidquodvoluntcredunt"""
        output = """ferelibenterhominesidquodvoluntcredunt"""
        self.assertIO(input, output)


if __name__ == "__main__":
    
    resolve()

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

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

answer = ''
for i, s in enumerate(S):
    if i > K - 1:
        answer += '...'
        break
    else:
        answer += s

print(answer)

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

k = int(input())
s = input().strip()

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

Solution (Python):
import sys
import math
import itertools
import numpy

rl = sys.stdin.readline
k = int(rl())
s = rl().rstrip()
if len(s) > k:
  print(s[0:k]+'...')
else:
  print(s)

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

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

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

Solution (Python):

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

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

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

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

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

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

Solution (Python):
import sys

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

K = INT()
S = input()

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

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

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

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

Solution (Python):




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

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

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

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

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

Solution (Python):
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    k = int(input())
    s = input()[:-1].decode()
    if len(s) <= k:
        print(s)
    else:
        print(s[0:k], '...', sep='')


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Solution (Python):

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

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

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
def input(): return sys.stdin.readline().strip()


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



if __name__ == "__main__":
    main()

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

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

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

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

Solution (Python):
input = raw_input


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

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

print(out)

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

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

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

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

def resolve():
    K = I()
    s = S()

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

if __name__ == '__main__':
    resolve()

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

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

Solution (Python):
import sys
import os
import math
import bisect
import collections
import itertools
import heapq
import re
import queue



ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)


MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    K = ii()
    S = iss()

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



if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
if __name__ == "__main__":
  k = int(input())
  s = input()

  if len(s) <= k:
    print(s)
    exit()
  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[: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 '{}...'.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 = 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[0:K]+"...")

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

Solution (Python):
k = int(input().strip())
s = input().strip()
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[0:K]+'...')

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

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

main()

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

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

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

print(s)

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

Solution (Python):
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

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

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

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

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

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

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

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

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

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

Solution (Python):
import sys
import math

n=int(input())
a=list(str(input()))
if len(a)<=n:
    print(''.join(a))
else:
    b=a[:n]+['...']
    print(''.join(b))

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

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

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

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

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

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

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

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

print(solve(K, S))

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

Solution (Python):
inf = 10 ** 15
mod = 10 ** 9 + 7
k = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    print('{}{}'.format(s[:k],'...'))

Solution (Python):
import sys
from collections import deque
import copy
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()

n = len(s)

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

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

Solution (Python):
import sys
import math
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
from collections import deque
from bisect import bisect_left
from itertools import product
def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]

def LSI(): return list(map(int, list(sys.stdin.readline().rstrip())))
def LSI2(N): return [list(map(int, list(sys.stdin.readline().rstrip()))) for i in range(N)]

def ST(): return sys.stdin.readline().rstrip()
def LST(): return sys.stdin.readline().rstrip().split()
def LST2(N): return [sys.stdin.readline().rstrip().split() for i in range(N)]
def FILL(i,h): return [i for j in range(h)]
def FILL2(i,h,w): return [FILL(i,w) for j in range(h)]
def FILL3(i,h,w,d): return [FILL2(i,w,d) for j in range(h)]
def FILL4(i,h,w,d,d2): return [FILL3(i,w,d,d2) for j in range(h)]
def sisha(num,digit): return Decimal(str(num)).quantize(Decimal(digit),rounding=ROUND_HALF_UP)

MOD = 1000000007
INF = float("inf")
sys.setrecursionlimit(10**6+10)

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

Solution (Python):
from collections import deque
from collections import defaultdict
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()

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

Solution (Python):
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate, product, combinations_with_replacement
import sys
import bisect
import string
import math
import time


def I(): return int(input())
def S(): return input()
def MI(): return map(int, input().split())
def MS(): return map(str, input().split())
def LI(): return [int(i) for i in input().split()]
def LI_(): return [int(i)-1 for i in input().split()]
def StoI(): return [ord(i)-97 for i in input()]
def ItoS(nn): return chr(nn+97)
def input(): return sys.stdin.readline().rstrip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def print_matrix(mat):
    for i in range(len(mat)):
        print(*['IINF' if v == IINF else "{:0=4}".format(v) for v in mat[i]])


yn = {False: 'No', True: 'Yes'}
YN = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**19
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
show_flg = False



def main():
    K = I()
    s = S()

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


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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):
def convert(s): 
  
    
    new = "" 
  
    
    for x in s: 
        new += x  
  
    
    return new 
k=int(input())
s=input()
if len(s)<=k:
  print(s)
else:
  a=[]
  for i in range(k):
    a.append(s[i])
  a.append('...')
  print(convert(a))

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

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

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

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

Solution (Python):
import sys
import numpy as np





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

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

ans = S
if len(S) > K:
    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()

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(700000)

def s_in():
    return input()

def n_in():
    return int(input())

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

k=n_in()
s=s_in()

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

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

Solution (Python):
k, s = int(input()), 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):
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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

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

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

Solution (Python):

import bisect
import heapq
import math
import random
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub


import sys


buff_readline = sys.stdin.readline
readline = sys.stdin.readline

INF = 2**62-1


def read_int():
    return int(buff_readline())


def read_int_n():
    return list(map(int, buff_readline().split()))


def read_float():
    return float(buff_readline())


def read_float_n():
    return list(map(float, buff_readline().split()))


def read_str():
    return readline().strip()


def read_str_n():
    return readline().strip().split()

def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(K, S):
    if len(S) <= K:
        return S
    return S[:K] + '...'


def main():
    K = read_int()
    S = read_str()
    print(slv(K, S))


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

Solution (Python):
from sys import stdin, stdout

int_in = lambda: int(stdin.readline())
arr_in = lambda: [int(x) for x in stdin.readline().split()]
mat_in = lambda rows: [arr_in() for y in range(rows)]
str_in = lambda: stdin.readline().strip()
out = lambda o: stdout.write("{}\n".format(o))
arr_out = lambda o: out(" ".join(map(str, o)))
bool_out = lambda o: out("YES" if o else "NO")


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


if __name__ == "__main__":
    k = int_in()
    s = str_in()
    out(solve(k, s))