peterverebics/CodeNet_Python_118 huggingface dataset:
import sys
import math
input = sys.stdin.readline

############ ---- Input Functions ---- ############
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()

def invr():
    return(map(int,input().split()))

def solve(s,k):
    len1 = len(s)
    if len1 <= k:
        print(s)

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

def main():
    k = inp()
    solve(input(),k)


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

if len(S) <= K:
  print(S)
else:
  print(S[0:K]+"…")
K = int(input())
S = input()
a = len(S)

if a <= K:
    print(S)
else:
    print(S[0:K-1]+"...")
import sys
import math
input = sys.stdin.readline

############ ---- Input Functions ---- ############
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()

def invr():
    return(map(int,input().split()))

def solve(s,k):
    len1 = len(s)
    if len1 < k:
        return s

    else:
        corte = s[:k]
        corte += '...'
        return corte

def main():
    k = inp()
    print(solve(input(),k))


main()
K = int(input())
S = input()
if(1<= K <=100 and 1<= len(S) <=100):
    con = S.lower()
    if(K == len(con)):
        print(con)
    else:
        print(con[0:K], end="...")
K = int(input())
S = input()

if len(S) < K:
    print(S)
elif len(S) > K:
    print(S[0:K] + '...')
length = int(input())
input_str = input()

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

leng = len(S)
print(leng)

if(leng >= K):
  word = S[0:K] + '...'
else:
  word = S

print(word)
import sys
K = int(sys.stdin.readline())
S = sys.stdin.readline()
if len(S) > K:
    print(S[:K] + "...")
else:
    print(S)
k = int(input())
s = input()
if k >= len(s):
  print(s)
else:
  print(s[:7] + "...")
k = int(input())
s = input()

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

if len(S) <= K:
    print(S)
else:
    print(S[:7] + '...')
K = int(input())
S = input()
list_s =list(S)
T = len(list_s)
if T > K:
    for i in range(K,T):
        list_s[i] = '.'
    S =""
    for i in range(T):
        S += list_s[i]
print(S)
k=int(input())
s=input()
l=len(s)
if l<=k:
    print(s)
else:
    n=s[0:k]
    print(n)
n = int(input())
s = input()

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

if K - len(S) >= 0:
    print(S)
else:
    print(S[0:K+1].format(...))
K = int(input('数字：'))
S = input('文字列：')


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

if len(S)<=K:
  print(S)
else:
  print(S[0:K],'...')
k = int(input())
s = input()

if k > len(s):
    print(s)
else:
    print(f"{s[:7]}...")
k = int(input())
s = list(input())
result =[]
for i,letter in enumerate(s):
    result.append(letter)
    if i+1 >= k:
        result.append("...")
        break
print("".join(result))
k = int(input())
s = str(input())
if k > len(s):
  print(s)
else:
  print('{st}...'.format(st=s[0:k]))
a=int(input())
b=input()
c=len(b)
if c==a-1 or c<a:
  print(b)
else:
  print(b[:a]+'...')
K = int(input())
S = input()
if len(S)<=K:
    print(S)
else:
    print(S[:K], end="")
    print("."*(len(S)-K))
K=int(input())
S=input()
l=len(S)
if l<=K:
  print(K)
else:
  ans=S[0:K]
  print(ans+"...")
def tripleDots(n, string):
	string_len = len(string)
	if string_len > n : 
		string = string[ 0 : n ] + "..."
	return string

arr = ["", ""]

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


tripleDots(int(arr[0]), arr[1])
k = int(input())
s = input()
#print(n[len(n) - 1])
if len(s) < k:
  print(s)
else:
  print(s[:k] + '...')
K = int(input())
S = input()
print(S[:K] + '...' if len(S) >= K else S)
K = int(input())
S = str(input())

if len(S) >= K:
  print(S[:K]+"...")
else:
  print(S)
n = [input() for i in range(2)]

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

print(k,s)

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

else:
    s = s[0:k] + "..."
    print(s)
number=int(input())
word=input()
length=len(word)
if length<=number:
  print(word)
if length>number:
  word=word[0:number-1]
  print(word+"...")
K = int(input())
S = str(input())
if K<len(S):
    S = S[:K:1] + "..."
else:
    pass
print(K)
print(S)
K = int(input())
S = input() 
if len(S)<=K:
    print(S)
else:
    print(S[:7]+'...')
K = int(input())
S = input()

if len(S)<=K:
    print(S)
else:
    print(S[:7] + '...')
K=int(input())
S=str(input())
if K>=len(S):
    print(S)
else:
    print(S[:K],"...")
K = int(input())
S = str(input())
s = len(S)
if s < K:
    print(S)
else :
    print(S[0:K]+"...")
n = int(input())
s = input()
a = len(s)
if a <= n:
  print(s)
else:
  print(s[0:n-1] + '...')
k=int(input())
s=input()

if len(s)<=k:
    print(s)
else:
    print(s[:k+1]+'...')
K=int(input())
S=input()

if len(S) > K:
  S = S[:7]
  S += "..."
print(S)
#!/usr/bin/env python3
# atcoder 
# Türkçe konuşyorum
# Türkler var mı
# memnün oldum

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


slen = len(S)
if(slen < K):
    print(S)
else: 
    pr = S[:K]
    change = S[K:]
    for i in range(len(change)):
        change = change.replace(change[i], ".")
    print(pr + change)
K = int(input())
S = input()
L = len(S)
if K <= L:
  print(S[0:K]+"...")
else:
  print(S)
x = input()
y = input()
z = len(y)
if z <= int(x):
  print(y)
else:
  print(y[:int(x)])
k = int(input())
s = str(input())
n = len(s) - k
print(s[:-k-1]+'...' if n>0 else s)
import sys
input = sys.stdin.readline

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

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


if __name__ == '__main__':
    main()
K=int(input())
S=input()
if (K>=len(S)):
    print (S)
else:
    print ((S[0:(K-1)]) + "...")
k = int(input())
s = input()
ans = ""
if(k<len(s)):
    ans += s[0:k]
    ans.ljust(len(s)-k,'.')
else:
    ans+=s[0:k]

print(ans)
K = int(input())
S = input()
cnt = '...'

if len(S) <= K:
    print(S)
else:
    print(S[:7] + str(cnt))
def moji(S,K):
    if len(S)<=K:
        print(S)
    else:
        T=""
        for i in range(len(S)):
            if i <K:
                 T+=S[i]
            if i >=K:
                continue
        T+="..."
        print(T)
k = int(input())
s = input()

if len(s) <= k:
    print(s)
else:
    print(s[:7] + "...")
K = int(input())
S = input()
if len(S) > K:
    print(S[:-K-1] + '...')
else:
    print(S)
K = int(input())
S = input()
s = len(S)

if s <= K:
  print(S)
else:
  print(S + "...")
K = int(input())
S = input()

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

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

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

if len(s) <= k:
    print(s)
else:
    print(s[:k] + '・・・')
import sys
import math
input = sys.stdin.readline

############ ---- Input Functions ---- ############
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()

def invr():
    return(map(int,input().split()))

def solve(s,k):
    len1 = len(s)
    if len1 <= k:
        return s

    else:
        corte = s[:k]
        corte += '...'
        return corte

def main():
    k = inp()
    print(solve(input(),k))


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

ss = list(s)

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

m=len(n)

t=int (k)



if(m==t):
  print("n")
  
else:
  for i, name in enumerate(n):
    if i==t:
      break
    print(name,end='')
k = int(input())
s = input()

if len(s) >= k:
    s = s[0:k]

s = s + '...'

print(s)
from sys import stdin
import math
import fractions
from collections import deque
from collections import Counter
import itertools

readline = stdin.buffer.readline

INF = 10 ** 10

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

if len(S) < K:
    print(S)
else:
    tmp = "".join([c for c in S[:K]])
    print(tmp + "...")
#import re
import sys
input = sys.stdin.readline
#import heapq
#import bisect
#from collections import deque
#import math

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


    
if __name__ == '__main__':
    main()
k = input()
s = input()
if len(s)>=int(k):
    print(s)
else:
    print(s[0:int(k)]+'...')
k = int(input())
s = input()
if len(s)< k:
    print(s)
else:
    print(s[:k]+'...')
K=int(input())
S=str(input())
if len(S)<K:
    print(S)
else:
    print(S[:K]+'...')
n=int(input())
s=input()
score=''
if n>=len(s):
	print(s)
else:
	for i in range(n):
		score+=s[i]
print("{}...".format(score))
k = int(input())
s = input()

if len(s) > k:
    print(s[0] + '...')
else:
    print(s)
K=int(input())
S=input()
C=0
B=0
D=0
C=S
B=len(C)
B=int(B)
B=B+1
D=S+'...'
if B<=K:
    print(S)
else:
    print(D)
K = int(input())
S = input()
if(1<= K <=100 and 1<= len(S) <=100):
    if(K == len(S)):
        print(S)
    else:
        print(S[0:K], end="...")
n=int(input())

s=input()

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

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

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

if 0 < K < 101 and 0 < len(S) < 101:
    if len(S) < K:
        print(S)
    else:
        print(S[0:K] + "...") 
elif K > 100 or K < 1:
    print("Please choose an interger from 1 to 100")
elif len(S) > 100 or len(S) < 1:
    print("Please enter at least at least 1 string and not more than 100")
k = int(input())
s = input()

if len(s) <= k:
  print(s)
else:
  print(s[:k])
k = int(input())
s = input()
if k == len(s):
    print(s)
else:
    print(s[:k]+"...")
k = int(input())
s = str(input())
if len(s) > k:
    print(s[0:7] + "...")
else:
    print(s)
a = int(input())
s = list(str(input()))
w = []
for i in range(len(s)):
    w.append(s[i])
    if len(w) == a:
        print(''.join(w) +'...')
        exit()
print(''.join(s))
import sys

def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))
def RN(N): return [input().strip() for i in range(N)]


def main():
    K = II()
    S = input()
    Sl = len(S)
    print(Sl)
    if Sl <= K:
        print(S)
    else:
        ans = S[:K] + "..."
        print(ans)



if __name__ == "__main__":
	main()
N = int(input())
S = str(input())
if N > len(S):
    print(S)
else:
    s = S[:N]+'...'
    print(s)
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys


def input():
    return sys.stdin.readline()


def resolve():
    k = int(input())
    s = input()

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


if __name__ == "__main__":
    resolve()
def say_trim_log_words():
    k = input()
    s = input()

    min_length = int(k)

    print(s if len(s) < min_length else '{}...'.format(s[:min_length]))


if __name__ == '__main__':
    say_trim_log_words()
k = int(input())
s = input()
print(s if len(s)<k else s[:k]+'...')
K = int(input())
S = input()
a = ""
if len(S)<=K:
    print(S)
    exit()
else:
    for i in range(K):
        a+=S[i]
print(a,"...")
import sys
input = sys.stdin.readline
#input = sys.stdin.buffer.readline


#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()

#import numpy as np


def main():
	k=II()
	s=input()

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
















if __name__ == "__main__":
	main()
k = int(input())
s = input()
length = len(s)
if k < length:
    s = s[:k]
    for i in range(k, length):
        s += '.'

print(s)
K = int(input())
S = input()

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

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

if len(s) < K:
  print(s)
else:
  print(s[:K])
K=int(input())
S=input()

def moji(S,K):
    if len(S)<=K:
        print(S)
    else:
        T=""
        for i in range(len(S)):
            if i <K:
                 T+=S[i]
            if i >=K:
                continue
        T+="..."
        print(T)
K = int(input())
S = input()
if len(S) <= K: print(S)
else: print(S[:K] + "…")
K = int(input())
S = input()

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

K = int(input())
S = input()
sentence = list(S)
sentencelong = len(sentence)

if K < sentencelong:
  for i in range(K):
    print(sentence[i], end="")

  print("...")
elif K > sentencelong:
  print(S)
  
else:
  sys.exit()
# coding=UTF-8
from collections import deque
from operator import itemgetter
from bisect import bisect_left, bisect
import itertools
import sys
import math
import numpy as np
import time
sys.setrecursionlimit(10**6)
input = sys.stdin.readline


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


if __name__ == '__main__':
    main()
def main():
    import sys
    length = int(sys.stdin.readline())
    string = sys.stdin.readline()

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

if __name__ == "__main__":
    main()
k = int(input())
s = input()
#print(len(s))

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

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

# print('-----output-----')
import math
import sys

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

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

if len(S) < K:
    print(S)
else:
    print(S[:K]+'...')
#最初の1文字をインプット
k=int(input())
#文字列を1文字ずつ配列としてインプット
s=list(input())

#確認用
#print(k)
#print(s)

if len(s) <= k: #配列sの文字数がk以下なら
    print(s)
else: #配列sの文字数がkを超えているなら
    new_s=s[0:k] #配列の最初からk番目までを切りとる
    new_s.append("...") #末尾に...を加える
    print(new_s)
k = int(input())
s = input()


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

else :
    print(s[0:k],"...")
import sys

count = 0
for i in sys.stdin:
    if count == 0:
        K = int(i)
        count += 1
    else:
        S = i
        
length = len(S)
if length > K:
    S = S[:K]+"..."
print(S)
def solve():
    n = len(s)
    if n <= k:
        print(s)
    else:
        print(s + "...")
    return

#n, m = [int(ii) for ii in raw_input().split()]
k = int(input())
s = input()
solve()
K = int(input())
S = input()

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


else:
    print(S)
k = int(input())
s = input()

if len(s) <= k:
    print(s)
else:
    print(s+"...")
K=int(input())
S=input()
if len(S) <= K:
    print(S)
else:
    print(S[:len(S)-(K+1)] +'...')
n=int(input())
s=input()
if len(s)==n:
    print(s)
else:
    print(s[:n],end='')
    print('...')
def result(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        return S[:K] + '...'
n= int(input())
a = input()
g = "..."
if n == len(a):
  g =" "
print(a[0:n] + g)
k=int(input())
s=(input())
if len(s)<=k:
  print(s)
else:
  x='.'*k
  s=s[:k]+x
  print(s)
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 + "...")
k = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    print(s[:k+1]+'...')
inputk = input()
k = int(inputk)
s = input()
#len()は文字数取得
if(len(s) <= k): print(s)
else: print(s[1:k] + "...")
K = int(input())
S = input()
if K <= len(S):
  print(S)
else:
  print(S[:K]+"...")
n = int(input())
word = input()
ans = ""
if len(word) < n:
  print(word)
else:
  for i in range(n):
    ans += word[i]
  print(ans + "...")
#!/usr/bin/env python3


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

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

print(len(s))
if len(s)<=k: print(s)
else:
    print(s[:k]+'...')
k = int(input())
s = input()
ans= str()
for i in s:
    ans+=i
if len(s)<=k:
    print(ans)
else:
    print(ans+'...')
K = int(input())
S = input()

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

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

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

if len(s)<k:
    print(s)
else:
    print(s[:k]+"...")
K=int(input())
S=input().split()
num=len(S)
S=str(S[0])

if num>=K:
    print(S)
else:
    res=S[:K]
    print(res+"...")
import sys
K = int(sys.stdin.readline())
S = sys.stdin.readline().rstrip()
print(len(S))
if len(S) > K:
    print(S[:K] + "...")
else:
    print(S)
K = int(input())
S = input()

K = min(len(S), K)
for i in range(K):
    print(S[i], end='')

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

if len(s) <= k:
  print(s)
else:
  print("{}...".format(s[0:7]))
K=int(input())
S=input()

s=len(S)

if K<s:
    print(S[0:s+1]+"...")
if s<=K:
    print(S)
n= int(input())
L = list(input())

if len(L)<n:
	print(''.join(L))
else:
	print(''.join(L[:n])+'...')
K = int(input())
S = str(input())

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

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

if K>len(S):
    print(S)
else:
    print(S[0:7]+"...")
k=int(input())
s=list(input())
if len(s)<=k:
	print(s)
else:
    s=s[0:k]+["..."]
    print(*s,sep="")
K=int(input())
S=input()
if (K>=len(S)):
    print (S)
else:
    print ((S[0:(K+1)]) + "...")
k = int(input())
s = str(input())
if len(s) <= k:
    print(s)
else:
    print(s[:7]+'...')
K = int(input())
S = input()
if len(S) > K:
  print(S[:K])
else:
  print(S)
number=int(input())
word=input()
length=len(word)
if length<=number:
  print(word)
if length>number:
  word=word[0:number-1]+"..."
  print(word)
def x(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        x = S[:K]
        return x + '...'

print(x)
K=int(input())
S=input()
s=list(S)

if len(s) < K:
    print(S)
else:
    print(S[0:(K-1):],"...")
K=int(input())
S=input()
if len(S) > K:
	S = S[:K]
print(S+"...")
K=int(input())
S=list(input())
T=int(len(S))
if T>K:
    X=S[0:7]
    Y=str("".join(X))
    Z=str("...")
    print(Y+Z)
else:
    print("".join(S))
k = int(input())
s = input()
if len(s) >= k:
    print(s[0:k] + "...")
else:
    print(s)
k=int(input())
s=input()
t=len(list(s))
print(t)
n=""
if(t<=k):
    print(s)
else:
    for i in range(k):
        n=n+s[i]
    n=n+"..."
    print(n)
K = int(input())
S = input()

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

N = len(S)

if N < K:
    print(S)
else:
    for i in range(K):
        print(S[i],end="")
    print("...")
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy

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

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

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

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

if k>=int(S):
    print(K[:int(S)]+'...')
else:
    print(K)
k = int(input())
s = input()
ans = ""
if(k<len(s)):
    ans += s[0:k]
    ans += ans.ljust(len(s),'.')
else:
    ans+=s[0:k]

print(ans)
K = int(input())
S = input()

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


print (S[:K], "...",sep="")
k = int(input())
s = input()

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

S = input()

if len(S) >= K:
    print(S[:K] + "...")
else:
    print(S)
k=int(input())
s=str(input())
if(len(s)==k):
    print(s)
elif (len(s)>k):
    print(s[0:k],"...")
n=int(input())
k=input()
l = len(k)

if l<=n:
  print(k)
else:
  ans=""
  for i in range(n):
    ans+=k[n]
  print(ans)
K=int(input())
S=input()
hai=[]
if len(S)<K:
  print(S)
else:
  for i in range(0,K):
    hai.append(S[i])
  print(str(hai)+"...")
def triple_dot():
    k = int(input())
    s = list(input())
    len_s =len(s)
    result_s = []
    
    if len_s > k:
        for i in range(k):
            result_s.append(s[i])
    print("".join(result_s) + "...")


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

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

if len(S) < N:
    print(S + '...')
else:
    for i in range(N):
        print(S[i], end='')
    else:
        print("...")
k=int(input())
s=input()
if len(s)<=k:
  print(k)
else:
  print(s[:k]+"...")
k = int(input())
s = input()

if len(s) > 7:
  print("{}...".format(s))
else:
  print(s)
k = int(input())
s = input()

print(len(s))
if len(s)<k: print(s)
else:
    print(s[:7]+'...')
K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  l = S.split()
  for i in range(K - len(S)):
    l.pop(-1)
  print(''.join(l))
K = int(input())
S = input()

if len(S) <= K:
  print(S)
else:
  print("S[:K]"+"...")
k = int(input())
s = str(input())
d = len(s)
f = s[0:k]
b = f + '...'
if k <= d:
    print(b)
else:
    print(s)
import sys
#a = []
#for l in sys.stdin:
#    a.append(int(l))
k = int(input())
s = input()
if len(s) <= k:
   print(s)
else:
   for i in range(k):
      print(s[i], end="")
   for i in range(len(s) - k):
      print('.', end="")
input = input()
last_char = input[-1]
if last_char == "3":
    print("bon")
elif last_char in ["0", "1", "6", "8"]:
    print("pon")
else:
    print("hon")
k = input()
s = input()
if(len(s) <= int(k)):
  print(s)
else:
  print(s[:int(k)])
k=int(input())
s=input()
char=[]
if len(s) <= k:
    print(s)
else:
    for i in range(k):
        char.append((s[i]))
        
print(''.join(char) + "...")
k= input()
s= str(input())

while k==1 and k<=100 and len(s)==1 and len(s)<=100: #check if k and s are between 1 to 100

    if len(s) > k:
        #s.slice(k)
        print (s.slice(k)+"...") #cut the str until value of k and add ... to the end

    else:
        print (s)
k = int(input())
s = input()

print(s if len(s) < k else s[0:k] + "...")
def Int():
    return int(input())
def Ints():
    return map(int,input().split())
def IntList():
    return list(Ints())
def IntMat(N):
    return [IntList() for i in range(N)]

import sys
sys.setrecursionlimit(4100000)
rl = sys.stdin.readline

K = Int()
S = input()

if len(S) <= K:
    print(S)
else:
    ans = ''
    c = 0
    for i in S:
        if c < K:
            ans += i
        else:
            ans += '.'
        c += 1
    print(ans)
K = int(input())
S = input()
N = len(S)
if N <= K:
  print(S)
else:
  print(S[:K-1] + "...")
k = int(input())
s = input()
if k == len(s):
    print(s)
else:
    print(s[:k] + '...')
def resolve():
    K = int(input())
    S = input()
    print(S if len(S) < K else S[:K]+"...")

if '__main__' == __name__:
    resolve()
import sys
#a = []
#for l in sys.stdin:
#    a.append(int(l))
k = input()
s = input()
if len(s) >= len(k):
   print(s)
else:
   print(k)
   while i in range(len(k)-len(s)):
      print('.')
k = input()
k = int(k)
s = input()
if len(s) < k:
    print(s)
else:
    s = s[:k]
    print(str(s)+"...")
K=int(input())
S=str(input())
import sys
s=''
for i in range(K+1):
    try:
        s+=S[i]
    except IndexError:
        print (s)
        sys.exit()
s=s+'...'
print (s)
k=int(input())
s=input()
if len(s)<=k:
    print(s)
else:
    print(s[:7]+"...")
def main():
  K = int(input())
  S = input()
  if len(S) < K:
    print(S)
  else:
    print(S[:K]+"...")

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

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