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

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

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

Solution (Python):
from sys import stdin

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

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

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

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

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

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

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

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

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

Solution (Python):

"""
Created on Sun May 17 20:57:44 2020

@author: Kei
"""


K = input()
K = int(K)

S = input()


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

Solution (Python):
k = int(input())
s = str(input())
if k+1 > len(s):
  print(s)
else:
  print('{st}...'.format(st=s[0:k]))

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

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

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

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

Solution (Python):
K = int(input())
S = input()
ans = []
if len(S) > K:
    for i in range(K):
        ans.append(S[i])
    ans.append("...")
    print("".join(ans))
else:
    print(S)

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

Solution (Python):

if __name__ == "__main__":
    K = int(input())
    S = input()
    ans = ""
    if len(S) > K:
        ans = S[:K] + "..."
    else:
        ans = S
    print(ans)

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

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

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

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

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

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

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

Solution (Python):
import numpy,math

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

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

Solution (Python):
def solve():
    K = int(input())
    S = input()
    length_S = len(S)
    if length_S <= K:
        print('{}'.format(S))
    else:

        a = S[0:K]
        a += '...'
        print('{}'.format(a))



if __name__ == "__main__":
    solve()

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  print(S)

if __name__ == '__main__':
  main()

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

l = len(S)

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

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

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

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

if(long <= k):
    print(s)
else:
    print(''.join(s_list[:k])+'...')

Solution (Python):
datanum = int(input())
mojiretu = input()

if len(mojiretu) <= datanum:
  print(mojiretu)
  
else:
  print(mojiretu[:datanum] + "...")

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

Solution (Python):





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

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

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

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

Solution (Python):
number = int(input())
word =input()
word_list = list(word)
word_number = len(word_list)
cnt = 0
empty_word = ""
if word_number <= number:
    print(word)
else :
    while cnt <= number - 1 :
        empty_word += word_list[cnt]

        cnt += 1

    empty_word += "..."
    print(empty_word)

Solution (Python):
k=int(input())
S=input()
if len(S)<=k:
    print(S)
else:
    str=[]
    for i in range(k):
        str.append(S[i])
    str.append("...")
    for i in range(len(str)):
        print(str[i],end="")

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

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

Solution (Python):
k = int(input())
s = input()
print(s if len(s) <= k else "{}...".format(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):
print((lambda k, s: s if len(s) <= k else s[:k] + '...')(int(input()), input()))

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

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

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

  print(s)

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

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

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

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

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

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

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

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

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

Solution (Python):

import sys


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


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

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

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

Solution (Python):
X=int(input())
Y=list(input())
if X >= len(Y):
    print(''.join(Y[0:X]))
else:
    print(''.join(Y[0:X])+'...')

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

if len(b) <= a:
    ans = b
else:
    ans = b[0:a] + "..."

print(ans)

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

    print(s)


if __name__ == '__main__':
    main()

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

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

Solution (Python):
K = int(input())
S = input()
List = list(S)
l = len(List)

if l <= K:
  print(S)
else:
  a = List[0:K]
  print(''.join(a) + "...")

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

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

Solution (Python):
k=int(input())
s=input()
if len(s)<=k:
    print(s)
else:
    c=[]
    c[0:0]=s
    del c[k:]
    c.append('...')
    print(''.join(c))

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

S = input()

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

Solution (Python):
K = int(input())
S = input()
a = "..."

if(K >= len(S)):
  print(S)
else:
  print(S[0:K]+a)

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

Solution (Python):


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

if __name__ == "__main__":
    main()

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

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

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

Solution (Python):

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

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

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

Solution (Python):

"""AtCoder Beginner Contest 168: B - 
https://atcoder.jp/contests/abc168/tasks/abc168_b
"""

__author__ = 'bugttle <bugttle@gmail.com>'


def main():
    K = int(input())
    S = input()

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

if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

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

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

Solution (Python):
maxlen = int(input())
strs = input()
strslen = len(strs)

if maxlen >= strslen:
    print(strs)

else:
    ans = strs[:maxlen]
    ans += "..."
    print(ans)

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

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

Solution (Python):




if(__name__ == '__main__'):
    
    k = int(input())
    s = input()

    postfix = ""
    if k < len(s):
        postfix = "..."
    elif len(s) < k:
        k = len(s)

    ans = s[0:k] + postfix

    print(ans)

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

if(l < k + 1):
    print(s)
else:
    print(s[0:k] + '...')

Solution (Python):


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

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

Solution (Python):

import sys


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



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    K = int(next(tokens))  
    S = next(tokens)  
    solve(K, S)

if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
s = input().split()
k=int(s[0])
s = input()

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

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

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]+"...")

Solution (Python):
k = int(input())
s = input()
a =len(s)
if a<=k:
    print(s)

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

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

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

Solution (Python):
k = int(input())
s = input()
l = len(s)
S = s[:k]

if l > k:
    print(S+'...')
else:
    print(s)

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

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

Solution (Python):
import numpy as np
import itertools


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

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

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

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

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

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

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

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

Solution (Python):

MOD=10**9+7
INT_MAX=10**18+7
def INPUT():return list(int(i) for i in input().split())
def LIST_1D_ARRAY(n):return [0 for _ in range(n)]
def LIST_2D_ARRAY(m,n):return [[0 for _ in range(n)]for _ in range(m)]
def power(a,x):
    res=1
    while(x>0):
        if x&1:
            res=(res*a)%MOD
        a=(a*a)%MOD
        x//=2
    return res%MOD
def NCR_MOD(n,r):
    num=1
    for i in range(n,n-r,-1):num=(num*i)%MOD
    for j in range(1,r+1):num=(num*power(j,MOD-2))%MOD
    return num

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

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


def main(input, print):
    k = int(input())
    s = input().strip()
    if k >= len(s):
        print(s)
    else:
        print(s[:k] +'...')


if __name__ == '__main__':
    main(sys.stdin.readline, print)

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


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

Solution (Python):






"""Module docstring
"""

import functools
import heapq
import itertools
import logging
import math
import os
import random
import string
import sys
from argparse import ArgumentParser
from collections import defaultdict, deque
from copy import deepcopy
from io import BytesIO, IOBase
from typing import Dict, List, Optional, Set, Tuple


def solve(k: int, s: str) -> str:
    if len(s) <= k:
        return s
    return "".join((s[:k], ".", ".", "."))


def do_job(stdin, stdout):
    "Do the work"
    LOG.debug("Start working")
    
    K = int(stdin.readline().strip())
    S = stdin.readline().strip()
    result = solve(K, S)
    print(result, file=stdout)


def print_output(testcase: int, result, stdout) -> None:
    "Formats and print result"
    if result is None:
        result = "IMPOSSIBLE"
    print("Case 
    
    


BUFSIZE = 8192


class FastIO(IOBase):
    
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def configure_log() -> None:
    "Configure the log output"
    log_formatter = logging.Formatter("L%(lineno)d - " "%(message)s")
    handler = logging.StreamHandler(IOWrapper(sys.stderr))
    handler.setFormatter(log_formatter)
    LOG.addHandler(handler)


LOG = None

if not LOG:
    LOG = logging.getLogger("template")
    configure_log()


def main(argv=None):
    "Program wrapper."
    if argv is None:
        argv = sys.argv[1:]
    parser = ArgumentParser()
    parser.add_argument(
        "-v",
        "--verbose",
        dest="verbose",
        action="store_true",
        default=False,
        help="run as verbose mode",
    )
    args = parser.parse_args(argv)
    if args.verbose:
        LOG.setLevel(logging.DEBUG)
    stdin = IOWrapper(sys.stdin)
    stdout = IOWrapper(sys.stdout)
    do_job(stdin, stdout)
    stdout.flush()
    for h in LOG.handlers:
        h.flush()
    return 0


if __name__ == "__main__":
    sys.exit(main())

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

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


def main():
    K = int(input())
    S = input().strip()

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


if __name__ == '__main__':
    main()

Solution (Python):
import sys
k = int(sys.stdin.readline().rstrip("\n"))
s = sys.stdin.readline().rstrip("\n")
if len(s) > k:
    print(s[:k]+'...')
else:
    print(s)

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

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

Solution (Python):
from sys import stdin


def main():
    K = int(stdin.readline().rstrip())
    S = stdin.readline().rstrip()
    print(S if len(S) <= K else f'{S[:-(len(S) - K)]}...')


if __name__ == "__main__":
    main()

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):
import numpy as np
import math

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


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

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

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

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

if __name__ == '__main__':
  main()

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

K=int(input().rstrip('\n'))
S=input().rstrip('\n')
if K>=len(S):
  print(S)
else:
  print(S[:K]+'...')

Solution (Python):


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


main()

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

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

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

if __name__ == "__main__":
    main()

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

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

Solution (Python):


k = 0
s = ''

def format_input(filename = None):
	global k
	global s
	if filename == None:
		k = int(input())
		s = str(input())

	elif filename == '__random__':
		from random import randint as rng
		from random import choices
		k = rng(1, 10**2)
		s = ''.join(choices('abcdefghijklmnopqrstuvwxyz', k = rng(1, 10**2)))
		print(k)
		print(s)

def get_answer():
	answer = ''

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

	return answer

if __name__ == '__main__':
	format_input()

	ans = get_answer()
	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 len(S)<=K:
    print(S)

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

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

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

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

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

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

Solution (Python):
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))
if __name__ == "__main__":
    k = I()
    s = S()
    str =  s[:k] + "..."
    print(s if len(s) <= k else str)

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

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

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

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

ans = s[:k]

if(len(s) > k):
    ans = ans + '...'

print(ans)

Solution (Python):

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

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

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

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

Solution (Python):

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

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

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 = list(input())
if len(S) > K:
    ans = S[0:K]
    ans.append("...")
    print("".join(ans))
else:
    print("".join(S))

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

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

else:
    preans = s[:K]
    preans.append("...")
    ans = ""
    for i in preans:
        ans += i
    print(ans)

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

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

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

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

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

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

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

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

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

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

Solution (Python):
K = int(input())
S = input()
if len(S) <= K:
  print(S)
  exit(0)
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)
else:
  print(S[0:K],'','...',sep='')

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

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

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

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

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

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