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

Solution (Python):
'''
問題：
    英小文字からなる文字列 S があります。

    S の長さが K 以下であれば、Sをそのまま出力してください。
    S の長さが K を上回っているならば、先頭 K 文字だけを切り出し、
    末尾に ... を付加して出力してください。
'''

'''
制約：
    K は 1 以上 100 以下の整数
    S は英小文字からなる文字列
    S の長さは 1 以上 100 以下
'''


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

result = ""
if len(s) <= k:
    result = s
else:
    for i in range(0, k):
        result += s[i]
    result += "..."

print(result)

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

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

print(S)

Solution (Python):


K = int(input())

S = input()

if K >= len(S):
    answer = S
else:
    answer = S[0:K] + '...'

print(answer)

Solution (Python):
if __name__ == '__main__':

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()

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

size = len(S)

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

Solution (Python):
K = int(input())
S=input()
S1 = list(S)
S2 = len(S1)

if S2 <= 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[0: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()

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

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

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

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

K = int(x)

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

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

i = len(S)

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

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

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

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

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

Solution (Python):





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

def length(k: int, s:str) -> str:
    if len(s) <= k:
        return s
    else:
        return s[:k] + '...'  

print(length(k ,s))

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

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

Solution (Python):

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


    
    
    








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

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

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

if n >= len(kekw):
    print(kekw)
elif n < len(kekw):
    kekwlist = list(kekw)
    for i in range(0, n):
        print(kekwlist[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 K - len(S) >= 0:
    print(S)
else:
    print("{}...".format(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 k >= len(s):
    print(s)
elif k <= len(s):
    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 = str(input())


def answer(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        return S[:K] + '...'


print(answer(K, S))

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

def answer(K: int, S:str) ->str:
    if len(S) <= K:
        return S
    else:
        return S[:K]+'...'

print(answer(K,S))

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

def answer(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        return S[:K]+ '...'

print(answer(K, 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("{}...".format(s[0:k]))

Solution (Python):
length=int(input())
s=input()
string = ""
if len(s) <= length:
    print(s)

else:
    for i in range(0,length):
        string += s[i]
    string +="..."

    print(string)

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

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

if len(A) <= N:
  print(A)
else:
  print(A[:N] + '...')

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

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

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

s_l = len(S)
s_k = list(S)
answer = s_k[slice(0, K)]
result = ''.join(answer)

if s_l <= K:
    print(S)

else:
    print(result + '...')

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

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

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


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

else:
    print(s[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())

s = "".join(S[:K])
c = len(S)

if K >= c:
    print(s)
else:
    answer = s + "..."
    print(answer)

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

def answer(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        return S[:K]+ '...'

print(answer(K, S))

Solution (Python):
S_list = [input() for i in range(2)]
K = int(S_list[0])
S = S_list[1]
n = len(S)
if n <= K:
    result = S
else:
    S = S[:K] + "..."
    result = S
print(result)

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

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

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

else:
    print(S)

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

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


else:
    print(S)

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

if K < words:
    print(S[0:K] + "...")

else:
    print(S)

Solution (Python):



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

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

print(S)

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

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

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

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

Solution (Python):



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

SK = S[0: (K)]

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

Solution (Python):







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

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

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

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

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

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

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

Solution (Python):
N = int(input())
moji = str(input())

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

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

SK = S[0 : (K)]

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

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

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

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):
def answer(k: int, s: str) -> str:
    return s if len(s) <= k else s[:k] + '...'


def main():
    k = int(input())
    s = input()
    print(answer(k, s))


if __name__ == '__main__':
    main()

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

s_l = len(S)
s_k = list(S)
answer = s_k[slice(0, K)]
result = ''.join(answer)

if s_l <= K:
    print(S)

else:
    print(result + '...')

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()
S1 = list(S)
S2 = len(S1)

if S2 <= 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()

S_num = len(S)

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

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

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


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

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

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

Solution (Python):








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

def answer(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        return S[:K]+ '...'

print(answer(K, S))

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

len_S = len(S)

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

Solution (Python):

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

S_num = len(S)

if K >= S_num:
    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(str())

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

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 (1 <= K and K <= 100) and S.islower() and (1 <= len(S) and len(S) <= 100):
    if len(S)<=K:
        print(S)

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

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


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

Solution (Python):





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

len_S = len(S)

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

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


def result(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        answer = S[:K]
        return answer + '...'

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

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

len_s = len(S)

if len_s <= K:
  print(S)
else:
  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()
def result(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        answer = S[:K]
        return answer + '...'
print(result(K, S))

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

def answer(a:int,b:str):
    if len(b)<=a:
        return(b)
    else:
        return (b[0:a]+"...")

print(answer(K,S))

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

n = len(S)
list_S = list(S)

if n > K:
    tmp = list_S[0:K]
    print(''.join(tmp) + '...')
else:print(''.join(list_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()
def result(K: int, S: str) -> str:
    s_len = len(S)
    if s_len <= K:
        return S
    else:
        answer = ''
        i = 0
        while i <= K-1:
            answer += S[i]
            i += 1
        answer += '...'
        return answer
print(result(K, 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()

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

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

K = input()

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

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

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

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

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

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

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

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

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


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

Solution (Python):

def ac_168b(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        return S[0:K] + "..."

K = int(input())
S = input()
print(ac_168b(K, 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()

length = len(S)

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

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

Solution (Python):
k,s=open(0);k=int(k);print(s[:k]+'...'*(k<~-len(s)))

Solution (Python):
k,s=open(0);k=int(k);print(s[:k]+'...'*(-~k<len(s)))

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

Solution (Python):

ulim = int(input())
word = str(input())
wcnt = len(word)


if wcnt > ulim:
    print(word[:ulim] + "...")
else:
    print(word)

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

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

def main():
    k = int(input())
    s = input()
    s2 = ""
    if len(s) <= k:
        print(s)
    else:
        for i in range(k):
            s2 += s[i]
        s2 +=("...")
        print(s2)

if __name__ == "__main__":
    main()

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

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

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

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

for i in range(num):
    print(word[i],end="")
    if i+1 >= len(word):
        break

if len(word) > num:
    print("...")

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

Solution (Python):
def main(K, S):
    ans = S
    if len(S) <= K:
        return ans
    else:
        return ans[:K] + '...'

if __name__ == '__main__':
    K = int(input())
    S = input()
    ans = main(K, S)
    print(ans)

Solution (Python):
a=input()
a=int(a)
b=input()
c=""
if a>=len(b):
  print(b)
else:
  for i in range(a):
    c=c+b[i]
  print(c+"...")

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

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

l=len(s)

if l<=k:
  print(s)
else:
  s=list(s)
  t=[]
  for i in range(k):
    t.append(s[i])
  t.append('...')
  print(''.join(t))

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

Solution (Python):

N = int(input())

S = input()

strLen = len(S)

if strLen <= N :
    print(S)
else :
    result = S[0 : N]
    result += "..."
    print(result)

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

if '__main__' == __name__:
    resolve()

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

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

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

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

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

Solution (Python):

import sys
from itertools import chain


def solve(K: int, S: str):
    if len(S) <= K:
        return S
    else:
        return S[:K] + "..."


def main():
    tokens = chain(*(line.split() for line in sys.stdin))
    K = int(next(tokens))  
    S = next(tokens)  
    answer = solve(K, S)
    print(answer)


if __name__ == "__main__":
    main()

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

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

Solution (Python):
K = input()
S = input()
LS = len(S)
IK = int(K)

if LS <= IK:
    print(S)

elif LS > IK:
    print(S[0:IK] + '...')

Solution (Python):

import os
import sys
from io import BytesIO, IOBase
 
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")
 

from math import gcd, ceil
 
def pre(s):
    n = len(s)
    pi = [0] * n
    for i in range(1, n):
        j = pi[i - 1]
        while j and s[i] != s[j]:
            j = pi[j - 1]
        if s[i] == s[j]:
            j += 1
        pi[i] = j
    return pi
 
 
def prod(a):
    ans = 1
    for each in a:
        ans = (ans * each)
    return ans
 
def lcm(a, b): return a * b // gcd(a, b)
 
 
def binary(x, length=16):
    y = bin(x)[2:]
    return y if len(y) >= length else "0" * (length - len(y)) + y

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

Solution (Python):

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

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

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

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

if len(S) <=K:
  print (S)
else :
  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()
n = len(s)
list_s = list(s)


if n > k:
    tmp = list_s[0:k]
    print(''.join(tmp) + '...')
else: print(''.join(list_s))

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

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

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

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

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

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


if __name__ == "__main__":
    main()

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

Solution (Python):
K = int(input())
S = input()
result = ''
if len(S) <= K:
    print(S)
    exit()
elif len(S) > K:
    for i in range(K):
        result += S[i]
    result += '...'
    print(result)
    exit()

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

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

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

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

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

Solution (Python):

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

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

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

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

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

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

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

print(o)

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

Solution (Python):
K=int(input())
S=list(input())
T=int(len(S))
if T>K:
    X=S[0:K]
    Y=str("".join(X))
    Z=str("...")
    print(Y+Z)
else:
    print("".join(S))

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

Solution (Python):
k = int(input())               
s = str(input())               
if len(s) > k:                 
    print(s[:k], end="...")    
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):
import math
import collections
K = int(input())
S = input()
L = list(S)
if len(L) <= K:
  print(S)
else:
  M = L[:K]
  print(''.join(M)+'...')

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

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

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

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

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

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

Solution (Python):
a = int(input())
b = input()
c = len(b)

if c <= a:
    print(b)
else: 
    print(b[:a] + "...")

Solution (Python):
a = int(input())
b = list(input())
d = list(b[0])
if a < len(b):
    for c in range(a-1):
        d.append(b[c+1])
    d.append("...")
    d = "".join(d)
    print(d)
else:
    b = "".join(b)
    print(b)

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

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

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

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

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

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

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

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

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

S_len = len(S)
ans = ""

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

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

le = len(S)

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

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

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

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