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


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

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

print(ans)

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

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

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 = 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], end="...\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()

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

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

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

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

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

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

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

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

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

Solution (Python):
if __name__ == '__main__':
    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)

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):
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline



def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


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

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

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

Solution (Python):
k=int(input())
import sys
s=input()
t=''
if len(s)<=k:
    print(s)
    sys.exit()
else:
    for i in range(k):
        t+=s[i]
for i in range(3):
    t+="."
print(t)

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

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

Solution (Python):

"""
Created on Sun May 17 20:56:22 2020

@author: Kanaru Sato
"""

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

if n <= k:
    print("".join(s))
else:
    print("".join(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):
k = int(input())
s = str(input())

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

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

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

Solution (Python):
import itertools
import sys
import numpy as np
import collections


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 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 getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

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

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

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

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





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

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


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

Solution (Python):
import bisect
import collections
import functools
import heapq
import math
from collections import deque
from collections import defaultdict
MOD = 10**9+7

K = int(input())
S = list(input())
if len(S) > K:
    ans = "".join(S[:K])
    print(ans+"...")
else:
    ans = "".join(S)
    print(ans)

Solution (Python):
from __future__ import print_function

import sys
sys.setrecursionlimit(500000)

import re
import array
import copy
import functools
import operator

import math
import string
import fractions
from fractions import Fraction

import collections
import itertools
import bisect

import random
import time

import heapq
from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace
from queue import PriorityQueue as pq
from queue import Queue

from itertools import accumulate

from collections import deque
from collections import Counter

from operator import mul
from functools import reduce

input = sys.stdin.readline


def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return


















def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom


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


if __name__ == '__main__':
    main()

Solution (Python):
import sys



import collections





import copy



import queue

sys.setrecursionlimit(10000001)
INF = 10 ** 16
MOD = 10 ** 9 + 7
MOD2 = 998244353

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))





def main():
    k = ni()
    s = input()
    l = len(s)

    if l <= 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):
import time
startTimeProblem=time.time()

import fileinput, sys, itertools, functools
from math import *
from bisect import *
from heapq import *
from collections import *

def lcm(a, b):  
    return (a*b)/gcd(a, b)

class InputHelper:
    def __init__(self):
        self.myinput = fileinput.input()

    def isLocal(self):
        return not fileinput.isstdin()

    def int(self):
        return int(self.myinput.readline().rstrip())

    def ints(self):
        return [int(_) for _ in self.myinput.readline().rstrip().split()]

    def str(self):
        return self.myinput.readline().rstrip()

    def strs(self):
        return [_ for _ in self.myinput.readline().rstrip().split()]

class OutputHelper:
    def int(self, a):
        print(a)    

    def ints(self, a):  
        print(" ".join([str(_) for _ in a]))
    
    def intsNL(self, a):
        for _ in a:
            print(_)
    
    def str(self, s):
        print(s)

    def strs(self, s):
        print(" ".join([_ for _ in s]))

    def strsNL(self, s):
        for st in s:
            print(st)

class ListNode:
    def __init__(self, val):
        self.val = val
        self.next = None
        self.prev = None

In = InputHelper()
Out = OutputHelper()



K = In.int()
S = In.str()

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



if len(sys.argv)>2 and sys.argv[2]=="TIMEIT":
    fin = (time.time()-startTimeProblem)*1000
    print("{:.2f}".format(fin) + "ms")

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)

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

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

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

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

Solution (Python):




import sys
from io import StringIO
import unittest

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline

    
    
    k=int(readline())
    ss=readline().rstrip()
    if len(ss) <= k:
        print(ss)
    else:
        print(ss[0:k]+"...")
    

    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

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

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

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

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

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

Solution (Python):
def main():
    k = int(input())
    s = list(input())
    if k >= len(s):
        print(''.join(s))
        return
    ans = ''.join(s[:k])
    ans += '...'
    print(ans)
if __name__=='__main__':
    main()

Solution (Python):
from copy import copy, deepcopy
from collections import Counter
from math import sqrt, floor, factorial
from itertools import permutations, combinations, combinations_with_replacement
from operator import mul
from functools import reduce
import bisect

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

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

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

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

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

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

Solution (Python):
import sys
import os

def file_input():
    f = open('ABC168/input.txt', 'r')
    sys.stdin = f

def main():
    if os.getenv("ENV")=='LOCAL':
        file_input()

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

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

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

Solution (Python):
k=int(input())
s=input()
l=list(s)
n=len(l)
l1=[]
if n<=k:
    print(s)
else:
    for i in range(k):
        l1.append(l[i])
    l1.append(".")
    l1.append(".")
    l1.append(".")
    print("".join(l1))

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

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

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

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

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

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

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

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

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

Solution (Python):

import numpy as np
from collections import deque
import collections
import heapq

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

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

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

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

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

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

Solution (Python):

MOD = 10 ** 9 + 7
INFI = 10**10

import math

import itertools
import heapq


import copy
from functools import lru_cache

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default




def ret(a):
    c=[None]*(len(a)-1)
    if len(a)==1:
        return a[0]
    elif len(a)==0:
        return 0
    for i in range(1,len(a)):
        c[i-1]=abs(a[i]-a[i-1])
    return ret(c)


def main():
    k=int(input())
    s=list(input())
    if len(s)>k:
        print("".join(s[0:k])+"...")
    else:
        print("".join(s))




if __name__ == "__main__":

    main()

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

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

if len(S) <= K:
    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
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    K = int(input())
    S = input()
    n = len(S)
    if n<=K:
        print(S)
    else:
        print(S[:K]+'...')

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
inputString = input()
length = len(inputString)
if length <= n:
    print(inputString)
else:
    newString = inputString[0:n] + "..."
    print(newString)

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

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

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

Solution (Python):
from sys import stdin

def main():

    input = stdin.readline

    K = int(input())
    S = input()[:-1]


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


if __name__ == "__main__":
    main()

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


N = len(S)

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

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()

from collections import defaultdict, deque, Counter
from sys import exit
import heapq
import math
import copy
from operator import mul
from functools import reduce
from bisect import bisect_left, bisect_right

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

K = getN()
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):

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

if __name__ == '__main__':
    main()

Solution (Python):



from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement


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

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 6)  
to_index = lambda x: int(x) - 1  
print_list_in_2D = lambda x: print(*x, sep="\n")  


def input_int(): return int(input())

def map_int_input(): return map(int, input())

MII = map_int_input

def MII_split(): return map(int, input().split())

def MII_to_index(): return map(to_index, input())

def MII_split_to_index(): return map(to_index, input().split())


def list_int_inputs(): return list(map(int, input()))

LII = list_int_inputs

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


def LII_2D(rows_number): return [LII() for _ in range(rows_number)]

def LII_split_2D(rows_number): return [LII_split() for _ in range(rows_number)]

K = input_int()
S = input()

if len(S) > K:
    S = S[:K]
    S += '...'
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
sys.setrecursionlimit(10 ** 9)

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

if __name__ == '__main__':
    main()

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

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

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

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

if __name__ == '__main__':
    main()

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

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

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

if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

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

if __name__ == '__main__':
    main()

Solution (Python):
import sys
import math
import collections
from collections import deque
from functools import reduce
import heapq
k = int(input())

s = input()


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

Solution (Python):
import sys

sys.setrecursionlimit(10**6)
readline = sys.stdin.readline

def main():
    K = int(input())
    S = readline()[:-1]
    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[0:K]+'...')

Solution (Python):
import sys,queue,math,copy,itertools,bisect,collections,heapq

def main():
    sys.setrecursionlimit(10**7)
    INF = 10**18
    MOD = 10**9 + 7
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())
    SI = lambda : sys.stdin.readline().rstrip()

    K = NI()
    S = SI()

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

Solution (Python):
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right



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

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

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

length = len(s)

if k >= length:
    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 = str(input())

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

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

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

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

    if K >= len(S):
        print(S)
        return

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


resolve()

Solution (Python):
import math
import fractions
import collections
import itertools
K=int(input())
S=input()
if len(S)>K:
    print("".join((S[:K],"...")))
else:
    print(S)

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

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

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

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

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

Solution (Python):
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], '...', sep='')

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

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

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

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

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

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

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

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

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

print(s)

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

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

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

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

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


print(ans)

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

s = input()

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

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

Solution (Python):

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

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

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

Solution (Python):
from collections import defaultdict 
import math
if __name__ == '__main__':
    
    K = int(input())
    S = input()
    if len(S) <= K:
        print(S)
    else:
        print("{}...".format(S[:K]))

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

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

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

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

    K = int(input())
    S = list(input().rsplit()[0])

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


if __name__ == "__main__":
    main()

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

abc168_b()

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


if __name__ == "__main__":
    main()

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

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

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