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[0:k]+"...")
else:
  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):
num = int(input())
word = input()
length = int(len(word))
new_word = ""
if num >= length:
  print(word)
else:
  for n in range(0, num):
    new_word += word[n]
  print(new_word +"...")

Solution (Python):
K=int(input())
S=input()
if len(S)<=K:
    print(S)
else:
    D=list(S)
    del D[K:]
    D.append("...")
    print(*D, sep="")

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

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

Solution (Python):
a = list(map(int,input().split()))
b = input()
if len(b) <= a[0]:
  print(b)
else:
  print(b[0:a[0]]+"...")

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

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

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

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

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

Solution (Python):
K = int(input())
S = list(input())
newS = []

if len(S) <= K:
    newS = S
else:
    newS = S[0:K]
    newS.append('...')

print("".join(newS))

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

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

s = input()

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

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

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

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

if len(S) <= K:
    ans = "".join(S)
    print(ans)
else:
    for i in range(K,len(S)):
        S.pop()
    S.append("...")
    ans = "".join(S)
    print(ans)

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

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

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

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

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

s = input()


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

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

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

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

    print("...")

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

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

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

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

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

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

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

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

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

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

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

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

if K<len(S):
    del S[K:len(S)]
    S.append('...')
print(''.join(S))

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

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

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

Solution (Python):



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

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

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

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

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

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

if __name__ == '__main__':
    main()

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

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

Solution (Python):

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

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

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

Solution (Python):
K = int(input())
S = str(input())
lst = []
n = 0
if len(S) <= K :
    print(S)
else :
    for i in range(K) :
        lst.append(S[n])
        n+=1
    output = ''.join(lst)
    print(output + "...")

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

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

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

Solution (Python):


length = int(input())


string = input()

if len(string) > length:
    print(string[:length] + "...")
else:
    print(string)

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

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

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

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

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

Solution (Python):


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

l = len(s)

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

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

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

Y = S[:K]
if S!=Y:
	Y = Y + '...'
print(Y)

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

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

a=""
i=0
if len(S) <= N:
   print(S)
else:
   for i in range(N):
      b = S[i]
      a = a + b
   a = a + "..."
   print(a)

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

Solution (Python):
def a():
    n = int(input()) % 10
    if n == 2 or n == 4 or n == 5 or n == 7 or n == 9:
        print('hon')
    elif n == 3:
        print('bon')
    else:
        print('pon')




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


    




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()
lis = []

if len(S) <= K:
    print(S)
elif len(S) > K:
    for i in range(K):
        lis.append(S[i])
    lis.append("...")
for i in lis:
    print(i, end ="")

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

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

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

if len(lS)>K:
  print(''.join(lS[0:K])+'...')

else:
  print(S)

Solution (Python):
n = [input() for i in range(2)]

k = int(n[0])
s = n[1]

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

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

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

Solution (Python):
N = int(input())
s = input()
s_len = len(s)

if s_len <= N:
    print(s)
else:
    print(s[:N]+'...')

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

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

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

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

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

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

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

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

len_s = len(s)

s_k = s[:k]


dots = "."*3

if len_s <= k:
    print(s)
else:
    print(s_k+dots)

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 = str(S)
n = len(S)
if n <= K:
    print(S)
else:
    for i in range(K):
        print (L[i],end="")
    print("...")

Solution (Python):
import sys

str_list = []
for line in sys.stdin:
  str_list.append(line.strip("\n"))

if len(str_list[1]) > int(str_list[0]):
  print("{}...".format(str_list[1][:int(str_list[0])]))
else:
  print(str_list[1])

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

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

Solution (Python):

import sys
import math




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




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

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

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

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

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

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

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

Solution (Python):
def N(): return int(input())
def NM():return map(int,input().split())
def L():return list(NM())
def LN(n):return [N() for i in range(n)]
def LL(n):return [L() for i in range(n)]
def YesNo(x):print("Yes")if x==True else print("No")
k=N()
s=input()
if len(s)<=k:
    print(s)
else:
    print(s[:k]+"...")

Solution (Python):

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

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

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

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

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

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

Solution (Python):
def main():
  K = int(input())
  S = input()
  if K < len(S):
    print(S[: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)
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):
from sys import stdin

k = int(stdin.readline())
n = stdin.readline().rstrip()

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

Solution (Python):
import sys

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

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

Solution (Python):
K = int(input())
S = str(input()).lower()
if K>1 or K<100 or len(S)<1 or len(S)>100:
    if len(S)>K:
        print(f"{S[0:K]}...")
    else:
        print(S)
else:
    pass

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

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

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

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

Solution (Python):
a=int(input())
b=input()
i=0
while i<a and i<len(b):
    print(end=str(b[i]))
    i=i+1
if len(b)>a:
    print(end='...')

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

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

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

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

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

Solution (Python):

def main():
    K = int(input())
    S = input()
    if len(S) <= K:
        print(S)
    else:
        print(S[:K] + "...")
 
 
if __name__ == '__main__':
    import sys
    sys.setrecursionlimit(10000)
    main()

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

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

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

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[:K])
elif len(S) > K:
    print(S[:K] + ("." * 3))

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

N = len(S)

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

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

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

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

Solution (Python):
def solve(K, S):
    if len(S) <= K:
        print(S)
    else:
        print(S[0:K] + "...")

k, S = open(0).read().split()
K = int(k)
solve(K, S)

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

if s_2 > k:
    tmp = s[k:]
    s = s[:k]
    a = ["." for i in range(3)]
    s += "".join(a)
    ans = s
else:
    ans = s
print(s)

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

s=input()
st=""
for i in s[:n]:
    st=st+i

st=st+"..."
if(len(s)>n):print(st)
else:print(s)

Solution (Python):
k = int(input())
s = input()
a = ""
flag = False
if k < len(s):
    for i in range(k):
        a = a + s[i]
    a = a + "..."
    flag = True
if flag:
    print(a)
else:
    print(s)

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

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

elif int(K) <= len(S):
    print(S[0:int(K)]+'...')

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


from collections import Counter,defaultdict,deque
from itertools import permutations, combinations, combinations_with_replacement
from heapq import heappop, heappush
from fractions import gcd

sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

def main():
    k = inp()
    t = list(input())
    n = len(t)
    if n <= k:
        print(''.join(t))
        return
    ans = []
    for i in range(k):
        ans.append(t[i])
    for i in range(3):
        ans.append('.')
    print(''.join(ans))
    
if __name__ == "__main__":
    main()

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

if  len(s)<= k :  
    print(s[0:])  


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

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

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

Solution (Python):
count = int(input())
line = input()
rang = len(line)
if rang > count:
    print(line[:count] + "...")
    
else:
    print(line)

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

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

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

Solution (Python):

K = int(input())

S = input()
S_list  = list(S)

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

Solution (Python):


import sys






























def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    k = ii()
    s = input()
    n = len(s)
    if n <= k:
        print(s)
    else:
        print(s[:k] + '...')


if __name__ == "__main__":
    main()

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

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

Solution (Python):
num = int(input())
a = input()
if len(a) > num:
    i = 0
    for moji in a:
        if i < num:
            print(moji, end = "")
            i += 1
    print("...")
else:
    print(a)

Solution (Python):
if __name__=="__main__":
    
    K = input()
    S = input()
    K_len = int(K)
    S_len = len(S)

    if S_len <= K_len:
        print(S)
    else:
        print(S[:K_len]+str("..."))

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

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

Solution (Python):
n = int(input())
s = input()
ans = ""

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

print(ans)

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

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

Solution (Python):
K = int(input())
S = str(input())
mojiretu = ''
if len(S) <= K:
    print(S)
else:
    S = list(S)
    for i in range(K):
        mojiretu += S[i]
    mojiretu += "..."
    print(mojiretu)

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

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

Solution (Python):
import sys
def main():
    K = int(input())
    S = input()
    
    l = len(S)
    
    if l <= K:
        out = S
    else:
        new_s = S[:K] + str('...')
        out = new_s

    print(out)
main()

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

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

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

from collections import defaultdict, deque
from sys import exit
import math
import copy
from bisect import bisect_left
from heapq import *
import sys

INF = 10 ** 17
MOD = 998244353

def check(mid, points, origin, rotate):
    height = origin * math.cos(math.radians(rotate))
    
    cs = math.cos(math.radians(rotate))
    sn = math.sin(math.radians(rotate))
    for px, py in points:
        py = py - origin
        rx, ry = px*cs - py * sn, px * sn + py * cs
        if abs(rx) > height + 0.0000001 or abs(ry) > height + 0.0000001:
            
            return False

    return True


class Segtree_op():
    def __init__(self, n):
        self.size = 1
        while (n >= 1):
            self.size = self.size << 1
            n = n // 2

        self.arr = [self.unit() for i in range(self.size * 2)]

    def op(self, lch, rch):
        return lch + rch

    def unit(self):
        return 0

    def update(self, k, val):
        k += self.size - 1
        self.arr[k] = val
        while (k):
            k = (k - 1) // 2
            self.arr[k] = self.op(self.arr[k * 2 + 1], self.arr[k * 2 + 2])

    def query(self, l, r):
        L = l + self.size
        R = r + self.size
        s = self.unit()
        while L < R:
            if R & 1:
                R -= 1
                s = self.op(s, self.arr[R - 1])

            if L & 1:
                s = self.op(s, self.arr[L - 1])
                L += 1
            L >>= 1
            R >>= 1
        return s

    def show(self):
        idx = 1
        while (idx <= self.size):
            print(self.arr[idx - 1:idx * 2 - 1])
            idx *= 2


def solve():
    k = getN()
    s = input().strip()
    if len(s) <= k:
        print(s)
        return
    else:
        print(s[:k] + "...")

def main():
    n = getN()
    for _ in range(n):
        solve()
if __name__ == "__main__":
    solve()

Solution (Python):

"""
from sys import stdin
n = int(stdin.readline().rstrip())
data = [stdin.readline().rstrip().split() for _ in range(n)]
print(data)
print(*data, sep='\n')
"""


"""
s =input()
s=list(input())
a=int(input())
x,y = map(int,input().split())	
li = input().split()	
li = list(map(int,input().split()))	
li = input().split('T')	
"""


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

if len(S)<=K:
    for i in S:
        print(i,end="")
else:
    S_ = []
    S_ = S[0:K]
    S_.append("...")
    
    for j in S_:
        print(j,end ="")

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

l=len(s)

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

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

if len(S) <= K:
      print("".join([str(n) for n in S]))

else:
         m = S[0:K]
         m.append('...')
         print("".join([str(n) for n in m]))

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

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

a = len(s)

if k >= a:
    print(s)

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

Solution (Python):


import sys

def solve(K: int, S: str):
    if (len(S) <= K):
        print(S)
    else:
        print(S[0:K], "...", sep='')
    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()

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

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

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

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

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

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

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

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

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

Solution (Python):

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

Solution (Python):
import numpy as np

K = int(input())
S = input()
S = list(S)
mojiretu=''
if len(S) <= K:
    for x in S:
        mojiretu += x
    print(str(mojiretu))

else:
    del S[K:len(S)]
    for x in S:
        mojiretu += x
    print(str(mojiretu)+'...')

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

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

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

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

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

Solution (Python):

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

ss = list(s)

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