Problem:
 Score: 200 points    Problem Statement  We have a string S consisting of lowercase English letters.  If the length of S is at most K , print S without change.  If the length of S exceeds K , extract the first K characters in S , append ... to the end of them, and print the result.      Constraints   K is an integer between 1 and 100 (inclusive).  S is a string consisting of lowercase English letters.  The length of S is between 1 and 100 (inclusive).         Input  Input is given from Standard Input in the following format:  K  S       Output  Print a string as stated in Problem Statement.        Sample Input 1 7
nikoandsolstice      Sample Output 1 nikoand...  nikoandsolstice has a length of 15 , which exceeds K=7 .  We should extract the first 7 characters in this string, append ... to the end of them, and print the result nikoand... .       Sample Input 2 40
ferelibenterhominesidquodvoluntcredunt      Sample Output 2 ferelibenterhominesidquodvoluntcredunt  The famous quote from Gaius Julius Caesar.

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

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

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

Solution (Python):

def resolve():
    K = int(input())
    S = input()
    s_L = len(S)

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

if __name__ == "__main__":
    resolve()

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 K >= len(S):
    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 input_int():
    return int(input())



def int1(x):
    return int(x) - 1



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



def input_to_int_tuple():
    return tuple(map(int, input().split()))



def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


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

    if len(s) <= k:
        return s

    return s[:k] + "..."


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

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

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

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

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

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

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

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

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:
    for i in range(k):
        print(s[i],end='')
    print('...')
else:
    print(s)

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

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

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

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

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

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

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

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

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

Solution (Python):

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


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

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

Solution (Python):
import sys
import math


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

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

print(ans)

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

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

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

Solution (Python):
import sys
from collections import defaultdict,Counter

sys.setrecursionlimit(10**7)
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

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


if __name__ == "__main__":
    main()

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

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

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

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

Solution (Python):


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

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

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

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

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

Solution (Python):

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

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

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

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




'''
A=[]
B=[]
for i in range():
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)'''
k=int(input())
s=input().rstrip("\n")
if len(s)<=k:
    print(s)
else:
    print(s[:k]+"...")

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

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

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

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

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

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

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

if len(A) > N:
  print(A[:N]+"...")
else:
  print(A)

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

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

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

Solution (Python):
def solve():
  k = int(input())
  s = input()
  le = len(s)
  if le <= k:
    print(s)
  else:
    print(s[0:k]+"...")
  return 0
 
if __name__ == "__main__":
  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()
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[:K] + "...")

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

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

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

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

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

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

Solution (Python):





import sys,os
from io import BytesIO, IOBase
import collections,itertools,bisect,heapq,math,string


BUFSIZE = 8192

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

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

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

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

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

from math import radians
from heapq import heapify, heappush, heappop
import bisect
from math import pi
from collections import deque
from math import factorial
from math import log, ceil
from collections import defaultdict
from math import *
from sys import stdin, stdout
import itertools
import os
import sys
import threading
from collections import deque, Counter, OrderedDict, defaultdict
from heapq import *



from fractions import Fraction
mod = int(pow(10, 9)+7)



def ii(): return int(input())


def si(): return str(input())


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


def li1(): return list(mi())


def fii(): return int(stdin.readline())


def fsi(): return str(stdin.readline())


def fmi(): return map(int, stdin.readline().split())


def fli(): return list(fmi())


abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12,
       'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24,
       'z': 25}


def getKey(item): return item[0]


def sort2(l): return sorted(l, key=getKey)


def d2(n, m, num): return [[num for x in range(m)] for y in range(n)]


def isPowerOfTwo(x): return (x and (not (x & (x - 1))))


def decimalToBinary(n): return bin(n).replace("0b", "")


def ntl(n): return [int(i) for i in str(n)]


def powerMod(x, y, p):
    res = 1
    x %= p
    while y > 0:
        if y & 1:
            res = (res * x) % p
        y = y >> 1
        x = (x * x) % p
    return res


graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000


def bfs(d, v):
    q = []
    q.append(v)
    visited[v] = 1
    while len(q) != 0:
        x = q[0]
        q.pop(0)
        for i in d[x]:
            if visited[i] != 1:
                visited[i] = 1
                q.append(i)
        print(x)


def make_graph(e):
    d = {}
    for i in range(e):
        x, y = mi()
        if x not in d:
            d[x] = [y]
        else:
            d[x].append(y)
        if y not in d:
            d[y] = [x]
        else:
            d[y].append(x)
    return d


def gr2(n):
    d = defaultdict(list)
    for i in range(n):
        x, y = mi()
        d[x].append(y)
    return d


def connected_components(graph):
    seen = set()

    def dfs(v):
        vs = set([v])
        component = []
        while vs:
            v = vs.pop()
            seen.add(v)
            vs |= set(graph[v]) - seen
            component.append(v)
        return component

    ans = []
    for v in graph:
        if v not in seen:
            d = dfs(v)
            ans.append(d)
    return ans


def primeFactors(n):
    s = set()
    while n % 2 == 0:
        s.add(2)
        n = n // 2
    for i in range(3, int(sqrt(n)) + 1, 2):
        while n % i == 0:
            s.add(i)
            n = n // i
    if n > 2:
        s.add(n)
    return s


def find_all(a_str, sub):
    start = 0
    while True:
        start = a_str.find(sub, start)
        if start == -1:
            return
        yield start
        start += len(sub)


def SieveOfEratosthenes(n, isPrime):
    isPrime[0] = isPrime[1] = False
    for i in range(2, n):
        isPrime[i] = True
    p = 2
    while (p * p <= n):
        if (isPrime[p] == True):
            i = p * p
            while (i <= n):
                isPrime[i] = False
                i += p
        p += 1
    return isPrime


def dijkstra(edges, f, t):
    g = defaultdict(list)
    for l, r, c in edges:
        g[l].append((c, r))

    q, seen, mins = [(0, f, ())], set(), {f: 0}
    while q:
        (cost, v1, path) = heappop(q)
        if v1 not in seen:
            seen.add(v1)
            path = (v1, path)
            if v1 == t:
                return (cost, path)

            for c, v2 in g.get(v1, ()):
                if v2 in seen:
                    continue
                prev = mins.get(v2, None)
                next = cost + c
                if prev is None or next < prev:
                    mins[v2] = next
                    heappush(q, (next, v2, path))
    return float("inf")


def binsearch(a, l, r, x):
    while l <= r:
        mid = l + (r-1)//2
        if a[mid]:
            return mid
        elif a[mid] > x:
            l = mid-1
        else:
            r = mid+1
    return -1






def readTree(n):
    adj = [set() for _ in range(n)]
    for _ in range(n-1):
        u, v = map(int, input().split())
        adj[u-1].add(v-1)
        adj[v-1].add(u-1)
    return adj


def treeOrderByDepth(n, adj, root=0):
    parent = [-2] + [-1]*(n-1)
    ordered = []
    q = deque()
    q.append(root)
    depth = [0] * n
    while q:
        c = q.popleft()
        ordered.append(c)
        for a in adj[c]:
            if parent[a] == -1:
                parent[a] = c
                depth[a] = depth[c] + 1
                q.append(a)
    return (ordered, parent, depth)


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

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

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

Solution (Python):

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


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

Solution (Python):
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

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

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

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

Solution (Python):


def input_one_number():
    return int(input())

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

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

K = input_one_number()
S = input()

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

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

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+1:
    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):
import sys
sys.setrecursionlimit(10**6)
k = int(input())
s = input()

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

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

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

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

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

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

print(ans)

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

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

Solution (Python):
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce


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


def INT(): return int(input())


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


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


def ZIP(n): return 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:
        T = S[:K] + "..."
        print(T)


if __name__ == '__main__':
    main()

Solution (Python):

import numpy as np

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

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

Solution (Python):
def main():
    import sys
    K=int(sys.stdin.readline())
    S=sys.stdin.readline().strip()

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

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

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

from decimal import *





































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

inf = float('inf')
mod = 1000000007




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

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





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




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


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

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



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


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

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

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

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



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



if __name__ == "__main__":
	main()

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

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

Solution (Python):


from __future__ import division, print_function
import os;
import sys;
from io import BytesIO, IOBase
import math
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=str(input())
    if(k<len(s)):
        print(s[:k],end="...")
    else:
        print(s)






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

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

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

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

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

else:
    print(K)

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

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

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

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

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

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

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

if __name__ == "__main__":
    resolve()

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

Solution (Python):

import sys


input = sys.stdin.readline
def IS(cb): return cb(input().strip())
def IL(cb): return [cb(s) for s in input().strip().split()]
def IR(cb, rows): return [IS(cb) for _ in range(rows)]
def ILL(cb, rows): return [IL(cb) for _ in range(rows)]


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


solve()

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

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

Solution (Python):
import sys
import math 
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] + '...')