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

Solution (Python):

from sys import stdin

def S(): return stdin.readline().rstrip()
def I(): return int(stdin.readline().rstrip())

k = I()
s = S()

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

Solution (Python):


import sys
 
 
K = int(input())
S = input()
s_list = list(S)
if len(s_list) <= K:
    print(S)
    sys.exit()
else:
    ans = s_list[:K]
    ans.append('...')
    print(''.join(ans))

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

main()

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


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

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

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

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

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

Solution (Python):
import sys
import os
import bisect, collections, copy, itertools, math, string
def I(): return int(input())
def S(): return input()
def LI(): return list(map(int, input().split()))
def LS(): return list(input().split())

def solve():
	k = I()
	s = S()

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

if __name__ == '__main__':
	solve()

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

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

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

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

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

Solution (Python):

import sys

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

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

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

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

Solution (Python):
k = int(input())
s = str(input())
l = len(s)
ans = s

if l <= k:
    print(ans)
else:
    b = '.'*3
    ans = s[:k]+b
    print(ans)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

print(ans)

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

output = ""

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

print(output)

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

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

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

if len(s) <= k:
    print("".join(s))
    sys.exit()

else:
    x = []
    for i in range(k):
        x.append(s[i])
    x.append("...")
    print("".join(x))

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

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

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

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

Solution (Python):

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

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

    kotae2 = "".join(kotae)
    print(kotae2)

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

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

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

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

Solution (Python):


z=int(input())
a=input()
if len(a)>z:
    b=a[:z]
    print(b+"...")
else:
    print(a)

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

Solution (Python):
n=int(input())
t=input()
s=len(t)

if s<=n:
  print(t)
else:
  print(t[0:n]+"...")

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

s_l = len(s)

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

Solution (Python):
import sys, re
import math
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

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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7



k = INT()
s = input()
if len(s) > k:
    text = s[0:k] + "..."
    print(text)
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 = ''
for i in range(k):
    if i > len(s)-1:
        break
    ans += s[i]
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):
import sys

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

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

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

Solution (Python):
n=int(input())
s=input()
l=len(s);
if l<=n:
    print(s)
else:
    print(s[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= input()

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

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

if s_l > k:
    s = s[:k]
    s = f'{s}...'

print(s)

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
k=int(input())
s=input()
if k>=len(s):
  print(s)
else:
  sList=list(s)
  t=[]
  for i in range(k):
    t.append(sList[i])
    
  T=''.join(t)
  print(T+'...')

Solution (Python):

a=int(input())
b=input()

c=len(b)

if c>a:
    print(b[:a]+"...")

else:
    print(b)

Solution (Python):

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

L_S = len(S)

if (L_S <= K):
    print(S)

else:
    out = S[0:K] + "..."
    print(out)

Solution (Python):

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



ans = ""

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

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

Solution (Python):

K = int(input())
S = input()
a = ""
if len(S) > K:
    for i in range(K):
        a+=S[i]
    a+="..."
    print(a)
else:
    print(S)

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

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

else:
    a = S[:K] +"..."
    print(a)

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

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

Solution (Python):


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

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

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

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

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

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

Solution (Python):
import math
import re
import copy

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

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

m = input()

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

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

if len(s) <= k:
  ans = ''.join(s)
else:
  ans = ''.join(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):
import random
import math
LI = lambda: list(map(int,input().split()))
MI = lambda: map(int,input().split())
yes = lambda: print("Yes")
no = lambda: print("No")
I = lambda: list(input())
J = lambda x: "".join(x)
II = lambda: int(input())
SI = lambda: input()

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

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

if k >= len(s):
    print(s)
    exit()

for i in range(k):
    print(s[i], end='')

print("...")

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

len_s  =len(S)

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

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

Solution (Python):
gosu = int(input())
word = input()

if(len(word) > gosu):
  print(word[0:gosu] + '...')
else:
  print(word)

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

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

if num < len(input_str):
  ans_str = input_str[:num] + "..."
else:
  ans_str = input_str

print(ans_str)

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

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

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

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

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

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

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

Solution (Python):
k= int(input())
s=input()
ans = ['']*(k+3)
if len(s)<=k:
    print(s)
else:
    for i in range(k):
        ans[i]=s[i]
    ans[k]='.'
    ans[k+1] = '.'
    ans[k+2] = '.'
    for i in range(k+2):
        print(ans[i],end='')
    print(ans[k+2])

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

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

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

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

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:
    print(b)
else:
    print(b[0:a]+'...')

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

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

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

S_len =len(S)
S_new = S[:K]+'...'

if S_len <= K:
  print(S)
else:
  print(S_new)

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

num = len(s)
if (num <= k):
    ans = s
else:
    id = k - 1
    tar = s[0:k]
    ans = tar + "..."
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[0:k]+'...')

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

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

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def main():
    K, S = read().decode().split()
    K = int(K)
    if K < len(S):
        ans = S[:K] + '...'
    else:
        ans = S
    print(ans)
    return

if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

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

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

Solution (Python):
k=int(input())
s=input()
if len(s)>k:
  a=[s[i] for i in range(k)]
  a.append("...")
  print("".join(a))
else:
  print("".join(s))

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

Solution (Python):
k = int(input())
s = input()
list_s = list(s)
ans = ""

if len(list_s) <= k:
    print(s)
else:
    for i in range(k):
        ans += list_s[i]
    ans += "..."
    print(ans)

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


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

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

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

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

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

print(s)

Solution (Python):
k = int(input())
s = input()
if len(s) <= k:
    print(s)
elif len(s) > k:
    x = s[:k]
    dot = '...'
    ans = x + dot
    print(ans)

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

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

Solution (Python):
import sys
input = sys.stdin.readline
def main():
    K = int(input())
    S = input().rstrip()
    if len(S) <= K:
        print(S)
    else:
        newS = S[:K] + '...'
        print(newS)

if __name__ == '__main__':
    main()

Solution (Python):

K = int(input())
word = input()
list_word = list(word)
if len(list_word) <= K:
    print(word)
else:
    for n in range(K):
        print(list_word[n], end="")
    print("...")

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

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

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

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

Solution (Python):
if __name__ == '__main__':
    num =int(input())
    word = input()
    if len(word)<=num:
        print(word)
    else:
        string = ""
        for i in range(num):
            string+=word[i]
        string += "..."
        print(string)

Solution (Python):
if __name__ == "__main__":
    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>=int(len(S))):
    print(S)
else:
    a=S[0:K]
    
    print(a+'...')

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

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(s[: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 = 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[0:K]+"...")

Solution (Python):
"""
import random
import functools
import copy
import bisect
import array
import re
import collections
import heapq
import fractions
import itertools
import string
import math
from operator import itemgetter as ig
from bisect import bisect_left, bisect_right, insort_left, insort_right
from itertools import permutations, combinations, product, accumulate, groupby
from heapq import heappush, heappop
from collections import deque, defaultdict, Counter
import sys
sys.setrecursionlimit(10 ** 7)


inf = 10 ** 20
INF = float("INF")
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]
ddn9 = ddn + [(0, 0)]
'''for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:'''
"""

from collections import deque, defaultdict
import sys
sys.setrecursionlimit(10 ** 7)


def wi(): return list(map(int, sys.stdin.readline().split()))



def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]


def ws(): return sys.stdin.readline().split()


def si(): return int(sys.stdin.readline())  


def ss(): return input()


def hi(n): return [si() for _ in range(n)]


def hs(n): return [ss() for _ in range(n)]  


def s_list(): return list(input())


def mi(n): return [wi() for _ in range(n)]  


def mip(n): return [wip() for _ in range(n)]


def ms(n): return [ws() for _ in range(n)]


def num_grid(n): return [[int(i) for i in sys.stdin.readline().split()[
    0]] for _ in range(n)]  


def grid(n): return [s_list() for _ in range(n)]


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def round_up(a, b):
    """ a/b の切り上げ """
    c = (a + b - 1) / b
    return c


def lcm(a, b):
    """a,bの最小公倍数"""
    return a * b // gcd(a, b)


def floor(a, b):
    """floor(a/b) 整数値を返す"""
    c = (a - a % b)/b
    return int(c)


def main():
    K = int(input())
    S = input()
    if len(S) <= K:
        print(S)
    else:

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


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

print("{}".format(ret))

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

length = len(s)

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

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

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

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

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

Solution (Python):
import itertools
import math
import fractions
import functools
import copy

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)
    sys.exit()

S_list=[]

for i in range(K):
    S_list.append(S[i])
S_list.append("...")

print(''.join(S_list))

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

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

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

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

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

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

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

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

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

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

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

if __name__ == "__main__":
    main()

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

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

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

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

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

Solution (Python):


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

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

Solution (Python):
def input_from_console():
    k = int(input())
    s = input()
    return k, s


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


def main():
    k, s = input_from_console()
    print(solve(k, s))


if __name__ == "__main__":
    import sys

    if sys.gettrace():  
        check_cases()
    else:
        main()

Solution (Python):
length=eval(input(""))
string = input("")

if(len(string)<=length):
    print(string)
if(len(string)>length):
    print(string[0:length],end="...")

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

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


if __name__ == '__main__':
  main()

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

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

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

if K < len(S):
    S = S[:K] 
    S.append("...")

print("".join(S))

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

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

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

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

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

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

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

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

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)
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):
def main():
    k = int(input())
    s = input()
    if len(s) > k:
        print('%s...' % 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],end='');
    print('...');

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

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

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

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

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


if __name__ == '__main__':
    main()

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




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

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

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

Solution (Python):

import bisect
import collections
import sys

sys.setrecursionlimit(1000000)
ACMOD = 1000000007
INF = 1 << 62



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

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


solve()