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):
num = int(input())
input_string = input()

if num < len(input_string):
    difference = -(len(input_string) - num)
    result = input_string[:difference] + '...'
else:
    result = input_string

print(result)

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

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

Solution (Python):
K = int(input());
S = input()
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):
N = int(input())
bun = input()

if N >= len(bun):
  print(bun)
else:
  print(bun[0:N] + "...")

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

Solution (Python):
length = int(input())
text = input()

if length >= len(text):
    print(text)
else:
    print(text[0:length] + "...")

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

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

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

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

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

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

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

if len(string)<=num:
  print (string)
else:
  print (string[:num]+"...")

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

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


if __name__ == "__main__":
    main()

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

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

n = len(s)

if n > k:
    s = s[:k] + "..."

print(s)

Solution (Python):
def solution():
    k = int(input())
    s = str(input())
    if len(s) > k:
        return s[:k] + '...'
    else:
        return s

print(solution())

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

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

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

Solution (Python):
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

k = ni()
s = input()

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

Solution (Python):




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

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


if __name__ == '__main__':
  main()

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

if len(p) > n:
    print(p[0:n] + "...")
else:
    print(p)

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

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

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

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

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

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[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())
for i in range(1):
    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(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 = str(input())

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

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

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

Solution (Python):
input_1=input()
input_2=input()


    
length = len(input_2)


if int(length) <= int(input_1):
    print(input_2)
else:
    print(input_2[:int(input_1)]+"...")

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

slen = len(s)

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

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

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

Solution (Python):
k=int(input())
s=str(input())
if(len(s)<=k):
  print(s)
  
else:
  s=s[:k]
  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 = 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 *
from copy import *					
from heapq import *					
from string import *				
from random import *				
from bisect import *				
from sys import stdin				
from sys import maxsize				
from operator import *				
from itertools import *				
from collections import Counter		
from collections import defaultdict 

'''
40
ferelibenterhominesidquodvoluntcredunt
'''

def solve(l,k):
	n = len(l)
	if(n <= k):
		return l
	else:
		return l[:k] + '...'

N = int(stdin.readline())
l = input()
ans = solve(l,N)
print(ans)

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

max_int = 1000000001  
min_int = -max_int

n = int(sys.stdin.readline())
s = input()

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

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

Solution (Python):
import sys
k = int(sys.stdin.readline().rstrip())
s = sys.stdin.readline().rstrip()
l = len(s)
if l <= k:
  print(s)
else:
  print(s[:k] + "...")

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

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


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

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

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

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

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

Solution (Python):




from fractions import gcd
import math
from math import ceil,floor
import collections








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


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


if __name__ == '__main__':
    main()

Solution (Python):
k = input()
s = input()
i = 0
l = int(k)
p = str()
 
while i < l and len(s) > l:
    p = p + s[i]
    i = i + 1
while i < len(s) and len(s) <=l:
    p = p + s[i]
    i = i + 1
if len(s) > l:
	print(p + '...')
else:
	print(p)

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

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

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

if l < len(s):
	print(s[:l] + '...')
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('{}...'.format(S[:K]))

Solution (Python):
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

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

K=one_int()
S=one_str()

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

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

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

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

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

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

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

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

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

Solution (Python):

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

Solution (Python):
n=int(input())
data=input()
if len(data)<=n:
  print(data)
else:
  print("{}...".format(data[0:n]))

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

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

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

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

Solution (Python):
a = int(input())
b = input()
if len(b) > a:
    b = b[:a] + '...'
print(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()
l=len(s)
ans=''
for i in range(k):
  ans+=s[i]
  if i==l-1:
    break
else:
  ans+='...'
print(ans)

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

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

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

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

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

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

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

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

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

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

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

if int(K) < len(S):
    print(S[0:int(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):

n=int(input())
s=input()


xs=len(s)

if xs > 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().rstrip())
s = list(input().rstrip())

def print_len(k,s):
    for i in range(min(k,len(s))):
        print(s[i],end="")
    if len(s)-k > 0:
        print('...',end="")
    print()
    
print_len(k,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:
  S = S[:K] + "..."
print(S)

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

S = len(S_str)

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

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

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

Solution (Python):
number = int(input())
word = str(input())
if len(word) > number:
    print(word[:(number)]+'...')
else:
    print(word)

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

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

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

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

else:
    print(s[0:int(k)] + '...')

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

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

print(answer)

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

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

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] + '.' * 3)

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

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())
S2 = [0] * K

if len(S) <= K:
    print(''.join(S))
else:
    for i in range(K):
        S2[i] = S[i]
    S2.append('...')
    print(''.join(S2))

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

    return


if __name__=="__main__":
    main()

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

else:
    word=S

print(word)

Solution (Python):
k = int(input())
s = input()
if len(s) > k:
    res = ''
    for char in list(s):
        if len(res) >= k:
            break
        res += char
    print(res + '...')
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):
d = int(input())
str_d = input()

if d < len(str_d):
  print(str_d[:d] +'...')
else:
  print(str_d)

Solution (Python):

from __future__ import division, print_function
from collections import defaultdict, Counter, deque
from future_builtins import ascii, filter, hex, map, oct, zip
from itertools import imap as map, izip as zip, permutations, combinations, combinations_with_replacement
from __builtin__ import xrange as range
from math import ceil, factorial, log,tan,pi
from _continuation import continulet
from cStringIO import StringIO
from io import IOBase
import __pypy__
from bisect import bisect, insort, bisect_left, bisect_right
from fractions import Fraction
from functools import reduce
import string
import sys
import os
import re
inf = float('inf')
mod_ = int(1e9) + 7
mod = 998244353

def factors(n):
    from functools import reduce
    return set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0)))

def sieve(m):
    n=1
    primes = {}
    arr=set([])
    for i in range(2, int(m ** 0.5) + 1):
        a = n // i
        b = m // i
        for k in range(max(2, a), b + 1):
            c = i * k
            primes[c] = 1

    for i in range(max(n, 2), m + 1):
        if i not in primes:
            arr.add(i)

    return arr


class DisjointSetUnion:
    def __init__(self, n):
        self.parent = list(range(n))
        self.size = [1] * n
        self.num_sets = n
 
    def find(self, a):
        acopy = a
        while a != self.parent[a]:
            a = self.parent[a]
        while acopy != a:
            self.parent[acopy], acopy = a, self.parent[acopy]
        return a
 
    def union(self, a, b):
        a, b = self.find(a), self.find(b)
        if a != b:
            if self.size[a] < self.size[b]:
                a, b = b, a
 
            self.num_sets -= 1
            self.parent[b] = a
            self.size[a] += self.size[b]
 
    def set_size(self, a):
        return self.size[self.find(a)]
 
    def __len__(self):
        return self.num_sets

def isprime(t):
    for i in range(2,int(t**0.5)+1):
        if t%i==0:
            return False
    return True
def semiprime(x):
    for i in range(2,int(x**0.5)+1):
        if x%i==0:
            if isprime(i) and isprime(x//i) and i!=x//i:
                return True
    return False
    


def main():

    
    

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



        

        
    




    





BUFSIZE = 8192

class FastI(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = StringIO()
        self.newlines = 0

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


class FastO(IOBase):
    def __init__(self, file):
        self._fd = file.fileno()
        self._buffer = __pypy__.builders.StringBuilder()
        self.write = lambda s: self._buffer.append(s)

    def flush(self):
        os.write(self._fd, self._buffer.build())
        self._buffer = __pypy__.builders.StringBuilder()


def print(*args, **kwargs):
    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()

def gcd(x, y):
    while y:
        x, y = y, x % y
    return x

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



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

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

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

Solution (Python):
k = int(input())
S = input()
n = len(S)
if n <= k:
    print(S)
else:
    print(S[:k], end = '')
    print('...')

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()
l = len(s)
ans = str()
if k < l:
    for i in range(k):
        ans += s[i]
    ans += "..."
else:
    ans = s

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

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

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

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

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

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

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


if(len(s) <= k):
	print(s)
else:
	cnt = 0
	a = ""
	for i in s:
		a += i
		cnt += 1
		if cnt == k:
			break
	print(a + "...")

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

len_S = len(S)

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

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

l = len(S)

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

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

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

print(S)

Solution (Python):
import sys
K = int(input())
S = str(input())
if len(S) > K:
    for i in range(K):
        sys.stdout.write(S[i])
    print('...')
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 = input()
if len(S) <= K:
    print(S)
else:
    print(S[:K]+'...')

Solution (Python):
mo1=int(input())
mo2=input()

if mo1<len(mo2):
    print(mo2[0:mo1]+"...")
    pass
else:
    print(mo2)

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


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

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

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

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

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

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

Solution (Python):



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


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

else:
    print(K)

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

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

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

else:
  print(S)

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



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

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


if __name__ == '__main__':
    main()

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

if __name__ == '__main__':
    main()

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

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

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

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

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

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

Solution (Python):
"""
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""

import sys
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()

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

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):
import sys, os

if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

f = lambda:list(map(int,input().split()))

def get_qsa(file_name):
    audio, size = readfile(file_name)
    headers = {
        'Connection': 'keep-alive',
        'Content-Length': str(size)
    }

    
    parameter = {
                "request_id":int(time.time()*100),
                "th":1,
                "tht":"qf492_100fps",
                "the":1.000000,
                "thst":"neural"
                }
    res = requests.post(f"http://{config['ip']}:{config['port']}", timeout=120, data=audio, headers=headers, params = parameter)
    

    res_json = res.json()
    


    if res_json['retmsg']!="success":
        raise Exception
    

    bin_str = res_json["th"][0]["feat"]
    bin_data = base64.b64decode(bin_str)

    bin2qsa_siren(bin_data, file_name)


def solve():
    n = f()[0]
    s = input()

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

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

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

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

Solution (Python):


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

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

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

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

def main():
    import sys
    imput = sys.stdin.readline
    
    
    
    K = int(input())
    S = str(input())

    
    
    T = len(S)
    if T <= 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):
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 = str(input(''))

while not 1 <= k <= 100:
    print('out of range! enter again')
    k = int(input(''))

while not s.islower():
    print('must be lowercase! enter again')
    s = str(input(''))
    
if k >= len(s):
    print(s)

else:
    out = s[:k] + '...'
    print(out)

Solution (Python):


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

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

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

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

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

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