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):
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

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

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

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

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

nagasa = len(S)

P = '...'

if nagasa <= K:
	print(S)
else:
	S = S[0:K]+P
	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()
S = len(s)

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

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

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

lenS = len(S)

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

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians

from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))
ZIP = lambda: zip(*(MAP() for _ in range(n)))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    K = INT()
    S = INPUT()

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


if __name__ == '__main__':
    main()

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

lenS = len(S)

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

Solution (Python):
import numpy as np
import sys
import math

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
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
import numpy as np
INF = float("inf")











K = int(input())
S = list(input())[:-1]
n = len(S)
if n <= K:
    print("".join(S))
else:
    s = S[:K]+["..."]
    print("".join(s))

Solution (Python):

import os
import sys
from io import BytesIO, IOBase

def readvars():
    k = map(int,input().split())
    return(k)

def readlist():
    li = list(map(int,input().split()))
    return(li)

def anslist(li):
    ans = " ".join([str(v) for v in li])
    return(ans)

def main():

	t = 1


	for xx in range(t):
		k = int(input())
		s = input()
		li = len(s)
		if li <= k: print(s)
		else: print(s[:k]+"...")




BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")



if __name__ == "__main__":
    main()

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

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

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

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

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

mojisu = len(s)

ans = ''
if mojisu <= k:
    print(s)
else:
    for i in range(k):
        ans += s[i]
    ans += '...'
    print(ans)

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

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

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

length = len(S)

if length<=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(f'{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=list(input())
if len(S)<=K:
    print(*S,sep="")
else:
    kari=S[:K]
    kari.append("...")
    print(*kari,sep="")

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

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

Solution (Python):
def resolve():
  K = int(input())
  S = input()
  if len(S) <= K:
    print(S)
    return True
  print(S[:K]+"...")

if __name__ == "__main__":
    resolve()

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

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

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

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

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

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

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

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

ans = s

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

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

Solution (Python):
k = int(input())
S = input()
s = list(S)
p = []
if len(s) <= k:
    print(S)
else:
    for i in range(k):
        p.append(s[i])
    p.append('...')
    print(''.join(p))

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

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

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

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



















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:
    t_s = s[:k] + "..."
    print(t_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):
from math import ceil,sqrt,log,gcd,pi
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())

    
k=ii()
s=si()
if(len(s)<=k):
    print(s)
else:
    print(s[:k],end="")
    print('...')

Solution (Python):
tmp = input().split()
K = int(tmp[0])
N = input().split()


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

Solution (Python):
def main():
    k = int(input())
    s = list(input())
    n = len(s)
    if n > k:
        print(*s[:k], "...", sep="")
    else:
        print(*s, sep="")


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 inp():exec('global inppp\ninpmoto,inppp=input().split(),[]\nfor i in inpmoto:\n try:inppp.append(int(i))if float(i).is_integer()else inppp.append(float(i));\n except:\n  try:inppp.append(str(i))\n  except:print("error in inp")');return inppp[0]if len(inppp)==1else list(inppp)
k = inp()
s = inp()
if len(s) <= k:
    print(s)
else:
    print(s[:k]+"...")

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

Solution (Python):



def solve(*args: str) -> str:
    k = int(args[0])
    S = args[1]

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


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

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

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

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

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

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

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

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

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

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

Solution (Python):


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

if s_len<=K:
    print("".join(S))
else:
    tmp = S[:K]
    ans = "".join(tmp) + "..."
    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("{}...".format(S[0:K]))

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

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

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

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

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

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

if K >= length:
    print(S)
else:
    new_s = S[0:K]
    new_s = new_s + '...'
    print(new_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):
import sys

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

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

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

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

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

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

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

Solution (Python):
def main():
    k = int(input())
    s = input()
    if len(s) <= k:
        print(s)
        exit()
    for i in range(k):
        print(s[i], end='')
    print('...')


if __name__ == '__main__':
    main()

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

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

s = len(S)

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

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



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

print(ans)

Solution (Python):
"""
~~ Author : Bhaskar
~~ Dated : 16~05~2020
"""

import sys
INT_MAX = sys.maxsize
INT_MIN = -(sys.maxsize)-1
sys.setrecursionlimit(10**7)
mod = 1000000007


def IOE():
    sys.stdin = open("input.txt", "r")
    sys.stdout = open("output.txt", "w")


def main():
    k = int(sys.stdin.readline())
    s = sys.stdin.readline().replace("\n", "")
    if len(s) <= k:
        print(s)
    else:
        print(s[:k]+"...")


if __name__ == "__main__":
    try:
        IOE()
    except:
        pass
    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 len(S) <= K:
  print(S)
else:
  print(S[:K] +'...')

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

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

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

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

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

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

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

Solution (Python):
n=int(input())
hoge=input()
if(n>=len(hoge)):
  print(hoge)
else:
  print(hoge[:n], end="")
  print("...")

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()
T = ''
if len(S) <= K:
    print(S)
else:
    for i in range(K):
        T += S[i]
    print('{}{}'.format(T, '...'))

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

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

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

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

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

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

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

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

Solution (Python):
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):

import sys


def solve(K: int, S: str):
    '''
    >>> solve(1, 'a')
    'a'
    '''
    if len(S) <= K:
        return S
    return S[:K] + '...'



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)  
    print(solve(K, S))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    test()
    main()

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

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

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

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

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


if(len(s)<=k):
    print(s)
else:
    print(s[: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()
s = len(S)

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

Solution (Python):
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

k = ii()
s = input()

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

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




s = list(S)

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):
k = int(input())
s = str(input())
s_ = list(s)
if len(s_) <= k:
  ans = s
else:
  ans = ""
  for i in s_[:k]:
    ans += i
  ans += "..."
print(ans)

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

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

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

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

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

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

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

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

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

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

s =input()

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

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

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

Solution (Python):

from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


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

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




BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")



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

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

if len(s) > max_len:
    print(f"{s[:max_len]}...")
else:
    print(s)

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

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



def main():
    K = int(input().strip())
    S = input().strip()
    size = len(S)
    if size <= K:
        return S
    else:
        ans = S[:K] + "." * 3
        return ans


if __name__ == "__main__":
    print(main())

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

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

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

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

Solution (Python):
k = int(input())
w = list(input())
if len(w) > k:
    w = w[:k]
    w.append('...')
print(''.join(w))

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()
l=len(s)

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

Solution (Python):
import os
import sys
from io import BytesIO, IOBase


def solution(s, k):
    n = len(s)
    if n <= k:
        write(s)
    else:
        write(s[:k] + "...")


def main():
    k = r_int()
    s = input()
    solution(s, k)




BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)


def input():
    return sys.stdin.readline().rstrip("\r\n")


def write(*args, end='\n'):
    for x in args[:-1]:
        sys.stdout.write(str(x) + ' ')
    sys.stdout.write(str(args[-1]))
    sys.stdout.write(end)


def r_array():
    return [int(x) for x in input().split()]


def r_int():
    return int(input())


if __name__ == "__main__":
    main()

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

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

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

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

Solution (Python):



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

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

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

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

l = len(S)

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

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

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

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

Solution (Python):
def main():
    import sys
    sys.setrecursionlimit(10**6)
    input = sys.stdin.readline
    K = int(input())
    S = input().strip()
    if len(S) <= K:
        print(S)
    else:
        print(S[:K]+'...')
    

if __name__ == '__main__':
    main()