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().split()
S=str(S[0])

num=len(S)


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

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

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

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

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

if len(string) <= num:
    print(string)

else:
    print(string[:num]+"...")

Solution (Python):
a=input()
b=input()

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
def inp():
    return(int(input()))


k = inp()

s = input()
res = s
if len(s) > k:
    res = s[:k] + "..."
print(res)

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

        S_list = list(S)
        l = len(S_list)

        ans = []

        if l <= K:
                for i in range(l):
                        ans.append(S_list[i])
        else:
                for i in range(K):
                        ans.append(S_list[i])
                ans.append("...")

        ans = "".join(map(str,ans))
        print("{}".format(ans))

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

import sys





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


    
if __name__ == '__main__':
    main()

Solution (Python):
if __name__=='__main__':
  k=int(input())
  s=input()
  if k>=len(s):
    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):
K = int(input())
S = input()

ans  = ""

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

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

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

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

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

a = len(S)

if a > K:
    b = S[:K] + "..."
    print(b)
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()
s1=len(s)
if s1<=k:
    print(s)
else:
    s2=s[0:k]+'...'
    print(s2)

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

Solution (Python):
k = int(input())
s = list(map(str, input()))

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

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

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

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

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

if len <= K:
  print(S)

if len > K:
  for i in range(K):
    text.append(S[i])

  ans = ''.join(text)
  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 = 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)
elif len(s) > k:
    print(s[:k] + '...')
else:
    print(s)

Solution (Python):

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

lengths=len(s)

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

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

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

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

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

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

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

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

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

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

main()

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 6)

int1 = lambda x: int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def printlist(lst, k='\n'): print(k.join(list(map(str, lst))))
INF = float('inf')

def solve():
    k = II()
    S = input()

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


if __name__ == '__main__':
    solve()

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], "...", sep="")

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())
line=list(input())
if len(line)>num:
  line=line[:num]
  line.append("...")
linemap = map(str, line)
line = ''.join(linemap)
print(line)

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

Solution (Python):
K = int(input())
S = input()
n = len(S)
if n <= K:
    print(S)
else:
    t = []
    for i in range(K):
        t.append(S[i])
    t.append('...')
    T = ''.join(t)
    print(T)

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

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 resolve():
    k=int(input())
    s = str(input())
    n=len(s)
    if n<=k:
        a = str(''.join([x.strip() for x in s.split(',')]))
        print(a)
    else:
        t = s[:k]+"..."
        a = str(''.join([x.strip() for x in t.split(',')]))
        print(a)
resolve()

Solution (Python):


def main():
    k = int(input())
    s = str(input())

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

if __name__ == '__main__':
    main()

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

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

Solution (Python):
import math

if __name__ == '__main__':
    
    k = int(input())
    n = input()
    
    if (len(n) <= k):
        print(n)
    else:
        print(n[:k] + "...")

Solution (Python):
import os

def main():
    k = int(input())
    s = input()
    ans = ""
    if (len(s) <= k):
        print(s)
    else:
        ans = s[:k] + "..."
        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 = str(input())
S_ = list(S)
S_kari = ''

if K >= len(S_):
  print(S)
else:
  for i in range(K):
    S_kari += S_[i]
  S_kari += '...'
  print(S_kari)

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

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

ans = S[0:K]

if len(ans) < len(S):
    print(ans + '...')
else:
    print(ans)

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
k=int(input())
s=[i for i in input()]

ans=0

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

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

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

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

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

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

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

slen = len(S)

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

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

if len(M)>N:
    print(M[0:N]+'...')
else:
    print(M)

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

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

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

Solution (Python):
n = int(input())
word = input()
printlen = min(n, len(word))
if(printlen == len(word)):
   print(word)
else:
   print(word[:n] + '...')

Solution (Python):
cut = int(input())
moji = input()

length = len(moji)


if length <= cut:
  print(moji)
else:
  print("{}...".format(moji[0:cut]))

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

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

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

Solution (Python):
k = int(input())
s = list(input())
if len(s) <= k:
    print(*s,sep="")
else:
    a =[]
    for i in range(k):
        a.append(s[i])
    a.append("...")
    print(*a,sep="")

Solution (Python):
import math
import sys

stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))
mod = 10**9 + 7 
sys.setrecursionlimit(1000010)

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
if __name__ == "__main__":
    str_length = input()
    input_str = input()

    str_length = int(str_length)

    if len(input_str) <= str_length:
        lim_str = input_str
    else:
        lim_str = ''.join([c for c in input_str[0:str_length]])+'...'



    print(lim_str)

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:
    S_list=list(S)
    T_list=S_list[0:K]
    T_list.append("...")
    print(''.join(T_list))

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

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


length = len(S)

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

Solution (Python):
import sys
import math
def get_array(): return list(map(int,sys.stdin.readline().strip().split()))
def get_ints(): return map(int,sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
k=int(input())
s=input()
a=[]
p=""
if len(s)<=k:
    print(s)
else:
    for i in range(k):
        a.append(s[i])
    a.append("...")
    print(p.join(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[0:K] + "...")

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

Solution (Python):


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

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

else:
    print("{}...".format(S[0:K]))

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

Solution (Python):
k=int(input())
s=input()
a=list(s)
if k >= len(s):
    print(s)
    exit()
for i in range(k):
    print(a[i],end='')
print('...')

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

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

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

Solution (Python):
import sys,bisect,string,math,time,functools,random,fractions
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
from itertools import permutations,combinations,groupby
def Golf():*a,=map(int,open(0))
def I():return int(input())
def S_():return input()
def IS():return input().split()
def LS():return [i for i in input().split()]
def LI():return [int(i) for i in input().split()]
def LI_():return [int(i)-1 for i in input().split()]
def NI(n):return [int(input()) for i in range(n)]
def NI_(n):return [int(input())-1 for i in range(n)]
def StoLI():return [ord(i)-97 for i in input()]
def ItoS(n):return chr(n+97)
def LtoS(ls):return ''.join([chr(i+97) for i in ls])
def GI(V,E,ls=None,Directed=False,index=1):
    org_inp=[];g=[[] for i in range(V)]
    FromStdin=True if ls==None else False
    for i in range(E):
        if FromStdin:
            inp=LI()
            org_inp.append(inp)
        else:
            inp=ls[i]
        if len(inp)==2:
            a,b=inp;c=1
        else:
            a,b,c=inp
        if index==1:a-=1;b-=1
        aa=(a,c);bb=(b,c);g[a].append(bb)
        if not Directed:g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'

    mp=[boundary]*(w+2);found={}
    for i in range(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[boundary]+[mp_def[j] for j in s]+[boundary]
    mp+=[boundary]*(w+2)
    return h+2,w+2,mp,found
def TI(n):return GI(n,n-1)
def bit_combination(n,base=2):
    rt=[]
    for tb in range(base**n):s=[tb//(base**bt)%base for bt in range(n)];rt+=[s]
    return rt
def gcd(x,y):
    if y==0:return x
    if x%y==0:return y
    while x%y!=0:x,y=y,x%y
    return y
def show(*inp,end='\n'):
    if show_flg:print(*inp,end=end)
 
YN=['YES','NO'];Yn=['Yes','No']
mo=10**9+7
inf=float('inf')
FourNb=[(-1,0),(1,0),(0,1),(0,-1)];EightNb=[(-1,0),(1,0),(0,1),(0,-1),(1,1),(-1,-1),(1,-1),(-1,1)];compas=dict(zip('WENS',FourNb));cursol=dict(zip('LRUD',FourNb))
l_alp=string.ascii_lowercase

input=lambda: sys.stdin.readline().rstrip()
 
class Tree:
    def __init__(self,inp_size=None,ls=None,init=True,index=0):
        self.LCA_init_stat=False
        self.ETtable=[]
        if init:
            if ls==None:
                self.stdin(inp_size,index=index)
            else:
                self.size=len(ls)+1
                self.edges,_=GI(self.size,self.size-1,ls,index=index)
        return
 
    def stdin(self,inp_size=None,index=1):
        if inp_size==None:
            self.size=int(input())
        else:
            self.size=inp_size
        self.edges,_=GI(self.size,self.size-1,index=index)
        return
    
    def listin(self,ls,index=0):
        self.size=len(ls)+1
        self.edges,_=GI(self.size,self.size-1,ls,index=index)
        return
 
    def __str__(self):
        return  str(self.edges)
 
    def dfs(self,x,func=lambda prv,nx,dist:prv+dist,root_v=0):
        q=deque()
        q.append(x)
        v=[-1]*self.size
        v[x]=root_v
        while q:
            c=q.pop()
            for nb,d in self.edges[c]:
                if v[nb]==-1:
                    q.append(nb)
                    v[nb]=func(v[c],nb,d)
        return v
 
    def EulerTour(self,x):
        q=deque()
        q.append(x)
        self.depth=[None]*self.size
        self.depth[x]=0
        self.ETtable=[]
        self.ETdepth=[]
        self.ETin=[-1]*self.size
        self.ETout=[-1]*self.size
        cnt=0
        while q:
            c=q.pop()
            if c<0:
                ce=~c
            else:
                ce=c
                for nb,d in self.edges[ce]:
                    if self.depth[nb]==None:
                        q.append(~ce)
                        q.append(nb)
                        self.depth[nb]=self.depth[ce]+1
            self.ETtable.append(ce)
            self.ETdepth.append(self.depth[ce])
            if self.ETin[ce]==-1:
                self.ETin[ce]=cnt
            else:
                self.ETout[ce]=cnt
            cnt+=1
        return
    
    def LCA_init(self,root):
        self.EulerTour(root)
        self.st=SparseTable(self.ETdepth,init_func=min,init_idl=inf)
        self.LCA_init_stat=True
        return
    
    def LCA(self,root,x,y):
        if self.LCA_init_stat==False:
            self.LCA_init(root)
        xin,xout=self.ETin[x],self.ETout[x]
        yin,yout=self.ETin[y],self.ETout[y]
        a=min(xin,yin)
        b=max(xout,yout,xin,yin)
        id_of_min_dep_in_et=self.st.query_id(a,b+1)
        return self.ETtable[id_of_min_dep_in_et]
 
class SparseTable: 
    def __init__(self,ls,init_func=min,init_idl=float('inf')):
        self.func=init_func
        self.idl=init_idl
        self.size=len(ls)
        self.N0=self.size.bit_length()
        self.table=[ls[:]]
        self.index=[list(range(self.size))]
        self.lg=[0]*(self.size+1)
        
        for i in range(2,self.size+1):
            self.lg[i]=self.lg[i>>1]+1
 
        for i in range(self.N0):
            tmp=[self.func(self.table[i][j],self.table[i][min(j+(1<<i),self.size-1)]) for j in range(self.size)]
            tmp_id=[self.index[i][j] if self.table[i][j]==self.func(self.table[i][j],self.table[i][min(j+(1<<i),self.size-1)]) else self.index[i][min(j+(1<<i),self.size-1)] for j in range(self.size)]
            self.table+=[tmp]
            self.index+=[tmp_id]
    
    
    def query(self,l,r):
        if r>self.size:r=self.size
        
        N=self.lg[r-l]
        return self.func(self.table[N][l],self.table[N][max(0,r-(1<<N))])
    
    
    def query_id(self,l,r):
        if r>self.size:r=self.size
        
        N=self.lg[r-l]
        a,b=self.index[N][l],self.index[N][max(0,r-(1<<N))]
        if self.table[0][a]==self.func(self.table[N][l],self.table[N][max(0,r-(1<<N))]):
            b=a
        return b
    
    def __str__(self):
        return str(self.table[0])
 
    def print(self):
        for i in self.table:
            print(*i)
 
class Comb:
    def __init__(self,n,mo=10**9+7):
        self.fac=[0]*(n+1)
        self.inv=[1]*(n+1)
        self.fac[0]=1
        self.fact(n)
        for i in range(1,n+1):
            self.fac[i]=i*self.fac[i-1]%mo
            self.inv[n]*=i
            self.inv[n]%=mo
        self.inv[n]=pow(self.inv[n],mo-2,mo)
        for i in range(1,n):
            self.inv[n-i]=self.inv[n-i+1]*(n-i+1)%mo
        return
    
    def fact(self,n):
        return self.fac[n]
        
    def invf(self,n):
        return self.inv[n]
 
    def comb(self,x,y):
        if y<0 or y>x:
            return 0
        return self.fac[x]*self.inv[x-y]*self.inv[y]%mo
 
show_flg=False
show_flg=True
ans=0

k=I()
s=input()
ans=s
if len(s)>k:
    ans=ans[:k]+'...'

print(ans)

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

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

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

S_len = len(S)

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

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

sl = len(Sm)

if sl > K:
    print("".join(S[:K]) + "...")
else:
    print(Sm)

Solution (Python):
[K] = input().split()
K = int(K)
[S] = input().split()

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

print(S)

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

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

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

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

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

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

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

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

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

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

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

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

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

input_line = input()


if len(input_line) > cnt :
	print(input_line[:cnt] + "...")

else :
	print(input_line)

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

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

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

s = str(input())

n = len(s)

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

Solution (Python):
s=[input() for i in range(2)]
K = int(s[0])
S = str(s[1])

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

Solution (Python):
k = int(input());
s = input();
n = int(len(s));
a = '...'

if k >= n:
    print(s);
else:
    print(s[:k] + a);

Solution (Python):

class abc_168:
    
    def __init__(self):
        pass
    
    def A(self):
       N=int(input())
       hon=[2,4,5,7,9]
       pon=[0,1,6,8]
       bon=[3]
       
       ans=N%100
       ans=ans%10
       
       if ans in hon:print("hon")
       elif ans in pon:print("pon")
       else :print("bon")
    
    def B(self):
        K=int(input())
        S=input()
        
        if len(S)<=K:print(S)
        else:
            ans=S[0:K]+"..."
            print(ans)
        
    def C(self):
       pass
            
    def D(self):
        pass
        
    def E(self):
        pass
    
    def F(self):
        pass
    
    
if __name__=='__main__':
    obj=abc_168()
    obj.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:
    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 k >= len(s):
    str = s
else:
    str = s[:k] + '...'

print(str)

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

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

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

Solution (Python):
k = int(input())
s = list(map(str,input()))
j = len(s)
cnt = []

if j <= k:
    print("".join(s))
else:
    for i in range(k):
        i = s[i]
        cnt.append(i)
    print("".join(cnt)+"...")

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

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

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

s = input()

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