Problem:
 Score: 200 points    Problem Statement  We have a string S consisting of lowercase English letters.  If the length of S is at most K , print S without change.  If the length of S exceeds K , extract the first K characters in S , append ... to the end of them, and print the result.      Constraints   K is an integer between 1 and 100 (inclusive).  S is a string consisting of lowercase English letters.  The length of S is between 1 and 100 (inclusive).         Input  Input is given from Standard Input in the following format:  K  S       Output  Print a string as stated in Problem Statement.        Sample Input 1 7
nikoandsolstice      Sample Output 1 nikoand...  nikoandsolstice has a length of 15 , which exceeds K=7 .  We should extract the first 7 characters in this string, append ... to the end of them, and print the result nikoand... .       Sample Input 2 40
ferelibenterhominesidquodvoluntcredunt      Sample Output 2 ferelibenterhominesidquodvoluntcredunt  The famous quote from Gaius Julius Caesar.

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

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

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

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

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

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

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

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

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

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

Solution (Python):
k = int(input())
s = str(input())
add_str = "..."

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

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:
    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 = ''

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    output = ''
    if len(s) > k:
        for i in range(k):
            output += s[i]
        output += '...'
    else:
        output = s

    print(output)


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

Solution (Python):

K = int(input())
S = input()
ans = S[:K] + ['...', ''][len(S) <= K]
print(ans)

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

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

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

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



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

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

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

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

Solution (Python):
def main(k, s):
    if len(s) <= k:
        print(s)
    else:
        print(s[:k] + "...")


if __name__ == "__main__":
    k = int(input())
    s = input()
    main(k, s)

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

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

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

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

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

if len(s) > k:
    print(s[: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()
ans = s
if len(s) > k:
    ans = "%s..." % s[:k]

print(ans)

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

Solution (Python):
def main():
    k = int(input())
    s = input()
    if len(s) <= k:
        print(s)
        return
    else:
        r = ""
        for rr in range(k):
            r += s[rr]
        r += "..."
        print(r)
        return 

main()

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

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

ans = S

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

print(ans)

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

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

Solution (Python):
input_int = input()
input_str = input()

K = int(input_int)
S = str(input_str)

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

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


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

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

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

s = len(S)

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


main()

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

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

Solution (Python):
def tripleDots(n, string):
	string_len = len(string)
	if string_len > n : 
		string = string[ 0 : n ] + "..."
	print(string)

arr = ["", ""]

for i in range(2):
	arr[i] = input()


tripleDots(int(arr[0]), arr[1])

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

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

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

Solution (Python):
K=int(input())
d=list(map(str,input().split()))
D=[]
for i in range(len(d[0])):
    D.append(d[0][i])
if len(D)<=K:
    print(''.join(D))
else:
    print(d[0][0:K]+'...')

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

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

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

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

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


if __name__ == '__main__':
    Qb()

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:

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

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

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

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

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

Solution (Python):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    k = int(input())
    s = input()
    if len(s) <= k:
        print(s)
    else:
        print(s[:k]+'...')

if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
K = int(input())
S = input()
sentence=""
if len(S) <= K:
  print(S)
  exit(0)
if K < len(S):
  for i in range(K):
     sentence = sentence + S[i]
print(sentence + "...")

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

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

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

s_sub = s[:k]
print(''.join(s_sub) + '...')

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

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

Solution (Python):
k=int(input())
str=input()
char_list = list(str)

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

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

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

Solution (Python):
N=int(input())
S = list(input())
num=len(S)
if num<=N:
    print(*S,sep='')
else:
    for i in range(N):
          print(S[i], end='')
    print("...")

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

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

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()
i = 0
string = ""
if len(S) > K:
    while i < K:
        string += S[i]
        i += 1
    print(string + "...")
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())
str = list(input())
 
if len(str) <= K:
  print("".join(str))
else:
  print("".join(str[0:K]) + "...")

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

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

if k >= len(s):
    print(s)
    exit()
else:
    for i in range(k):
        s_print += s[i]
    s_print += '...'
print(s_print)

Solution (Python):

def main():
    import sys

    input = sys.stdin.readline

    K = int(input())
    S = input().rstrip()

    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(f"{s[:k]}...")

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

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

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

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

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

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

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

Solution (Python):
k, s = open(0).read().split()
K = int(k)

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

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

Solution (Python):
K = int(input())
S= list(str(input()))
list=[]
if(len(S)>K):
    for I in range(0,K):
        list.append(S[I])
        b="".join(list)
    print(b+"...")
else:
    x="".join(S)
    print(x)

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

Solution (Python):
k = int(raw_input())
s = raw_input()
l = len(s)
if k >= l:
    print(s)
else:
    ans = ""
    i = 0
    while i < k:
        ans += s[i]
        i += 1
    ans += "..."
    print(ans)

Solution (Python):
k = int(input())
s = input()
l = len(s)
if k >= l:
    print(s)
else:
    ans = ""
    i = 0
    while i < k:
        ans += s[i]
        i += 1
    ans += "..."
    print(ans)

Solution (Python):
k = int(input())
s = input()
l = len(s)
if k >= l:
    print(s)
else:
    ans = ""
    i = 0
    while i < k:
        ans += s[i]
        i += 1
    ans += "..."
    print(ans)

Solution (Python):
ln = int(input())
word = input()
if ln >= len(word):
    print(word)
else:
    print(word[:ln],end=(''))
    print("...")

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

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

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

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

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

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

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

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

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

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

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

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



if __name__ == '__main__':
    main()

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

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

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

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

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

    if len(S) > K:
        print(f"{S[:K]}...")
    else:
        print(S)

if __name__ == "__main__":
    resolve()

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

if k >= len(S):
	print(S)
else:
	ans = S[0:k]
	dots = '...'
	print(ans + dots)

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

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

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

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

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

Solution (Python):

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

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

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

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

Solution (Python):

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

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

Solution (Python):
"""AtCoder."""

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

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

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

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

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

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

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

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

Solution (Python):
K = int(input())
S = input()
Sl = list(S)
if len(S) > K:
    for i in range(K):
        print(Sl[i],end="")
        
    print("...")
    
else:
    print(S)

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

Solution (Python):


def main():

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

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

    else:
        ans = S[:K] + '...'

    print(ans)


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

Solution (Python):













































global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    K = int(lines[0])
    S = lines[1]
    
    
    
    
    
    
    
    
    

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

    return [result]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['7', 'nikoandsolstice']
        lines_export = ['nikoand...']
    if pattern == 2:
        lines_input = ['40', 'ferelibenterhominesidquodvoluntcredunt']
        lines_export = ['ferelibenterhominesidquodvoluntcredunt']
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

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

S_len = len(S)

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

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

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

Solution (Python):



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

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

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

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

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

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

Solution (Python):


from typing import *
import itertools
import math
import sys

INF = float('inf')


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


def main():

    sys.setrecursionlimit(10 ** 6)

    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)  
    print(solve(K, S))


if __name__ == '__main__':
    main()

Solution (Python):
def main():

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

if __name__ == '__main__':
    print(main())

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

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

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

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

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

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

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

if not ( 1 <= K <= 100 and isinstance(K,int) and S.islower() and 1 <= len(S) <= 100): sys.exit()

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

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

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

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

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

Solution (Python):
K = int(input())
S = 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], '...', sep='')

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

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

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

Solution (Python):

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

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

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

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

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

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

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

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

Solution (Python):
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,s=open(0)
k=int(k)
print(s[:k]+'...'*(len(s)-1>k))

Solution (Python):
k=int(input())
s=input()
print(s[:k]+"{0}".format("..."*(len(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()
S_list = list(S)

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

Solution (Python):

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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

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


def main():
    solve()


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):


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

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

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

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

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

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

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

s = input()

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

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

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

Solution (Python):


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

if __name__ == '__main__':
    
    print(main())

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

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

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

Solution (Python):
n = int(input())
s = input()
if len(s) > n:
  print(f'{s[:n]}...')
else:
  print(s)