peterverebics/CodeNet_Python_118 huggingface dataset:
k = int(input())
s = input()
if int(len(s)) <= k:
  	print(str(s))
else:
  	print(((str(s))[0:k]) + "...")
k = int(input())
s = input()

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

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

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

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

if len(S) <= K:
  print(S)
  
else:
  print(S[0:K] + "...")
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 9)

def main():
    k = int(input())
    s = input()[:-1]
    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:
    s2 = S[:K]
    print(s2 + "...")
K = int(input())
S = input()

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

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

print(txt[:n]+"..." if bool(txt[n:]) else txt)
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[0:K] + "...")
v = int(input())
s = input()
s_len = len(s)

if s_len > v:
  print(s[:v] + "...")
else:
  print(s)
K=int(input())
S=list(input())
if len(S)<=K:
    for s in S:
        print(s,end="")
    print()
    exit()
for i in range(K):
    print(S[i],end="")
print("...")
print()
k = int(input())
s = input()
l = len(s)
ans = str()
if k < l:
    for i in range(k):
        ans += s[i]
    ans += "..."
else:
    ans = s

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

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

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


else:
    print(S)
K=int(input())
S=str(input())

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


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

    if len(s) > k:

        print (s[:k]+"...") #cut the str until value of k and add ... to the end

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

if len(S)<=K:
    print(S)
else:
    print(S[:K]+"...")
n=int(input())
S=input()
if len(S)>n:
    print(S[:n]+"...")
else:
    print(S)
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

K = ir()
S = sr()
if len(S) <= K:
    answer = S
else:
    answer = S[:K] + '...'

print(answer)
k = int(input())
string = input()

if k >= len(string):
  print(string)
else:
  ans = string[0:k]
  ans += '...'
  print(ans)
k = input()
k = int(k)
s = input()
if len(s) <= k:
    print(str(s))
else:
    s = s[:k]
    print(str(s)+"...")
k = int(input())
s = input()
if len(s) > k:
  print(s[:k] + "...")
else:
  print(s)
k = int(input())
s = input().strip()

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

def print_len(k,s):
    for i in range(min(k,len(s))):
        print(s[i],end="")
    if len(s)-k > 0:
        print('...',end="")
    print()
    
print_len(k,s)
k = int(input())
s = list(input())

if len(s) > k:
    t = s[:k]
    t.append('...')
    print(''.join(t))
else:
    print(''.join(s))
k=int(input())
s=input()
ans=0

for i in range(len(s)):
    if i == k :
        ans = i
        break

if ans != 0 :
    print(s[:i]+'...')
else :
    print(s)
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)
K = int(input())
S = input()

if K>=len(S):
    print(S)
else:
    print(S[0:K]+'...')
k = int(input())
s = input()
if len(s) <= k:print(s)
else:print(s[0:k] + "...")
k = int(input())
moji = str(input())
length = int(len(moji))
if length <= k:
  print(moji)
else:
  moji2 = moji[0:k]
  print(moji2 + "...")
k = int(input())
s = input()

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

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

n = len(s)

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

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

if __name__ == '__main__':
    main()
# B - ... (Triple Dots)
# K
K = int(input())
# S
S = input()

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

print(answer)
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)
elif len(s) > k:
    print(s[:k] + "...")
k = int(input())
s= str(input())

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

input_line = input()


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

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

slist = list(s)
if len(slist) > k:
  l = ''
  for i in range(k):
    l += slist[i]
  print(l + '...')
else:
  print(s)
k = int(input())
s = input()

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


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

if len(S) <= K:
  print(S)
else :
  print(S[0:K] + "...")
# -*- coding: utf-8 -*-

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

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

if __name__ == '__main__':
    main()
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

K = ri()
S = rs()

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

i = len(S)

if K >= i:
    print(S)
else:
    print(S[0:K] + "...")
k = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    print(f'{s[:k]}...')
K = int(input())
S = input()

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

if l<=k:
    print(s)
else:
    new_string=s[:k]+"..."
    print(new_string)
# S の長さが K 以下であれば、 S をそのまま出力してください。 
# S の長さが K を上回っているならば、先頭 K 文字だけを切り出し、末尾に ... を付加して出力してください。

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

if len(s) <= k:
    print(s)
else:
    print(s[:k] + "...")
k=int(input())
s=input()
print(s if len(s)<=k else s[:k]+'...')
k = int(input())
s = input()
S = len(s)
if S<=k:
  print(s)
else:
  print(s[:k] + "...")
import sys
from collections import Counter
from collections import deque
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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

print(s) if len(s) <= k else print(s[:k] + '...')
k = int(input())
s = input()
s_list = list(s)
if len(s_list) <= k:
    print(s)
else:
    s_k = ''.join(s_list[0:k])
    print(s_k + '...')
k = int(input())
s = input()
if len(s) <= k:
  print(s)
else:
  print(s[:k] + '...')
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()
 
def printt(S,K):
  if len(S)<=K:
    print(S)
  else:
    print(S[:K]+'...')
      
printt(S,K)
# 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()
k=int(input())
s=input()

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


if len(S) <= K:
    print(S)
else:
    print(S[:K]+"...")
a=int(input())
b=input()
if len(b)<=a:
    print(b)
else:
    print(b[:a]+'...')
K=input()
S=list(input())
answer_str=S[0]
if len(S) <= int(K) :

  for i in range(len(S)-1):
    answer_str += S[i+1] 
  
else :
  for i in range(int(K)-1):
    answer_str += S[i+1] 
  answer_str += "..."
print(str(answer_str))
k = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    t = s[:k] +'...'
    print(t)
k = int(input())
s = input()

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

inputLine = input()

print(inputLine[0 : numTest] + '...' if len(inputLine) > numTest else inputLine)
limit = int(input())
string = input()

if limit < len(string):
    string = string[:limit] + '...'

print(string)
import sys
k =int(input())
s =list(str(input()))
s_s = len(s)
if k >= s_s:
  print("".join(map(str,s)))
  sys.exit()
ans = s[:k]
ans = "".join(map(str,ans))
ans = ans + '...'
print(ans)
K = int(input())
S = str(input())
lst = []
n = 0
if len(S) <= K :
    print(S)
else :
    for i in range(K) :
        lst.append(S[n])
        n+=1
    output = ''.join(lst)
    print(output + "...")
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()
k=int(input())
s=input()
s1=len(s)
if s1<=k:
    print(s)
else:
    c=s[:k]
    print(str(c)+"...")
k=int(input())
s=input()
if len(s)>k:
    print(s[:k],'...',sep='')
else:
    print(s)
K=int(input())
S=input()

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

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

slist = list(s)
if len(slist) > k:
  l = ''
  for i in range(k):
    l += slist[i]
  print('...' + l)
else:
  print(s)
a = int(input())
b = input()
print(b[:a]+'...')
import sys
N = input()
s = N[-1]
if s in ['2','4','5','7','9']:
  print('hon')
  sys.exit(0)
if s in ['0','1','6','8']:
  print('pon')
  sys.exit(0)
if s == '3':
  print('bon')
k=int(input())
s=str(input())
if(len(s)==k):
    print(s)
elif (len(s)>k):
    i=len(s)-k
    palabra=s[i:len(s)]+s[0:i]
    print(palabra)
K = int(input())
Sub = input()

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

if s <= K:
  print(S)
else:
  print(S[:K+1] + "...")
K = int(input())
S = input()
Sl = len(S)
if Sl <= K:
  ans = S
else:
  newS = S[0 : K-1]
  ans = (newS + "...")
print(ans)
#!/usr/bin/env python3
# atcoder 
# Türkçe konuşyorum
# Türkler var mı
# memnün oldum

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

if(len(S) <= K):
    print(S)
else:
    print(S[K:] + '.' * 3)
k=int(input())
s=input()
n=len(s)
if k>n:
  print(s[:k+1]+"...")
else:
  print(s)
K = int(input())
S = str(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[0:k]+'...')
num = int(input())
word = str(input())

if len(word) <= num:
    print(word)
else:
    word_r = word[:num]
    for _ in range(len(word) - num):
        word_r += '.'
    print(word_r)
K=int(input())
S=input()
s=list(S)

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

if(len(s)<k):
    print(s)
else:
    print(s[:7]+"...")
k = int(input())
s = input()
print(s if len(s)<k else s[:7]+'...')
k = int(input())
s = list(input())
if k>=len(s):
    print(s)
else:
    for i in range (k):
        print(s[i])
    print("...")
k = int(input())
s = input()

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

print(s)
K = int(input())
N = list(input())
#print(K,N)
ans = []
if len(N) > K:
	for i in range(len(N)-K):
		#print(i,len(N))
		N.pop(-1)
print("".join(N))
K = int(input())
S = input()
if len(S) >= K:
  print(S)
else:
  print(S[:K]+'...')
n=int(input())
s=input()
l=len(s);
if l<=n:
    print(s)
else:
    print(s[0:l-n-1]+"...");
K = int(input(), 10)
S = input()

if 0 < K < 101 and 0 < len(S) < 101:
    if len(S) < K:
        print(S)
    else:
        print(S[:K] + "...") 
elif K > 100 or K < 1:
    print("Please choose an interger between 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")
n = int(input())
m = input()

if len(m) < n :
    print(m)
else:
    print(m[:n]+"...")
k= int(input())
s= input()
if len(s)<=k:
	print(s)
else:
	print(s[1:k]+'...')
K = int(input())
str = list(input())

if len(str) <= K:
  print("".join(str))
else:
  print("".join(str[0:K]))
k=int(input())
s=input()
if int(len(s))<=k:
  print(s)
else:
  print(s[0:7]+'...')
n = int(input())
s = input()
len1 = len(s)
print(len1)
if(len1>=n):
    print(s[0:n]+"...")
else:
    print(s)
length=int(input())
s=input()
string = ""
if len(s) < length:
    print(s)

else:
    for i in range(0,length):
        string += s[i]
    string +="..."

    print(string)
k = int(input())
s = input()

if len(s) <k:
    print(s)
else:
    print(s[:k]+"...")
s = [input() for i in range(2)] 
s0 = int(s[0])
l0 = len(s[1])
if s0 >= l0:
    print(s[1])
if s0 < l0:
    print(s[1][:s0],'...')
K=int(input())
S=str(input())
if K>1 and K<100 and len(S)>1 and len(S)<100:
    if len(S)==K or len(S)<K:
        print(S)
    else:
        print(S[:7]+'...')
#!/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()
K = int(input())
S = input()
SS = (int(len(S)))
if SS-K < 0:
  print(S)
else:
  print((S[:SS-K])+('.'*K))
k = int(input())
s = input()

if len(s) <= k:
	print(s)
else:
 	print(s[0:(k-1)])
k = int(input(''))
s = str(input(''))

while not 1 <= k <= 100:
    print('out of range! enter again')
    k = int(input(''))

while not s.islower():
    print('must be lowercase! enter again')
    s = str(input(''))

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

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

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

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

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

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

else:
         m = S[0:K]
         m.append('...')
         print("".join([str(n) for n in m]))
k = int(input())
s = input()
print((s[:k], s)[k >= len(s)])
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[:7] + '...')
a = int(input())
z = input()

print(z[0:a] + "...")
k = input()
s = input()
print(s)
if(len(s) <= int(k)):
  print(s)
else:
  print(s[:int(k)])
k = int(input())
s = list(input())
result =[]
for i,letter in enumerate(s):
    result.append(letter)
    if k == 0:
        print("...")
        break
    elif i+1 == k:
        break
    elif i+1 > k:
        result.append("...")
        break
print("".join(result))
a = int(input())
s = input()
if len(s) > a:
  print(s[:a+1]+"...")
else:
  print(s)
k = int(input())
s = str(input())

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

S = input()

strLen = len(S)

if strLen <= N :
    print(S)
else :
    result = S[0 : N]
    index = 0
    while index < (strLen - N):
        index = index + 1
        result += '.'
    print(result)
def main():
    k = int(input())
    s = input()

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

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

SK = S[0 : (K)]

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

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

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

s = input()

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

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

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

s_l = len(S)
if s_l > K:
  print(S[0:7] + "...")
else:
  print(S)
K = int(input())
S = input()
ls = list(S)
if len(S) >= K:
  ansl = ls[0:K]
  print(''.join(ansl) + '...')
else:
  print(S)
K=int(input())
S=input()
sbreak=list(S)
news=[]
if len(sbreak)<=K:
    print(S)
else:
    for num in sbreak:
        news.append(num)
        if num==sbreak[K-1]:
            break
    s=''.join(news)
    print(s+'...')
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 + "...")
a=input()
a=int(a)
b=input()
c=""
if a>=len(b):
  print(b)
else:
  for i in range(a):
    c=c+b[i]
  print(c)
s = int(input())
t = input()

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

def print_len(k,s):
    for i in range(min(k,len(s))):
        print(s[i],end="")
    for i in range(len(s)-k):
        print('.',end="")
    print()
    
print_len(k,s)
K = input()
S = input()
K = int(K)
if len(S) < K:
    print(S)
else:
    a = S[:K] + "..."
    print(a)
k = int(input())
s = input()

if( len(s) <= k):
    print(s)
else:
    res = s[0:7] + "..."
    print(res)
keta = int(input())
word = str(input())

if len(word) <= keta:
  print(word)
else:
  print(word[:keta-1] + "...")
n=int(input())
st=input()
if n>=len(st):
    print(st)
else:
    print(st[0:n-1])
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:
      print("...")
      break
    print(name,end='')
K = int(input("enter a number: "))
S = input("enter a random string: ")
def f(K, S):
    if 0 < K < 101 and 0 < len(S)+1 < 101:
        if len(S) < K:
            return S
        else:
            M = len(S) - K
            return S[0:M] + "..."
    elif K > 100 or K < 1:
        return "Please choose an interger from 1 to 100"
    elif len(S) > 100 or len(S) < 1:
        return "Please enter at least at least 1 string and not more than 100"

print (f(K, S))
k = int(input())
s = input()
l = len(s)
if k <= l:
  print(s)
if k > l:
  print(s[0:k]+"...")
n = int(input())
p = list(input())
del p[n:]
p="".join(p)
print(p)
import sys
a = []
for l in sys.stdin:
    a.append(l)

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

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

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

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

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

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

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

n1 = input()

i = len(n1)

n2 = '...'

if n > i:
    print(n1)
else:
    print(n1[:n] + n2)
K=int(input())
S=input()
if len(S)<=K:
    print(S)
else:
   print(S+"...")
k=int(input())
s=input()
l=len(s)
if(l<=k):
  print(s)
else:
  s=s[k:]
  print(s)
def x(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        return S[:K] + '...'
value = int(input())
text = input()
if value < len(text):
    print(text[0]+'...')
else:
    print(text)
K = int(input())
S = input()
print(len(S))
if len(S) <= K:
    print(S)
else:
    print(f"{S[:K]}...")
n=int(input())
w=input()
wordlength=len(w)
if n>=wordlength: print(w)
else: print(w[:n])
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:
    print(S)
else:
    S_ = S[:K]+"..."
    print(S_)
K = int(input())
S = input().lower()

if len(S) < K:
    print(S)
elif len(S) > K:
    print(f"{S[0:K]}{'...'}")
k = int(input())
s = input()
x = len(s)

if k >= x:
  print(s)

else:
  print(s[0:k+1] + "...")
# AtCoder
n = int(input())
s = input()

if len(s) >= n:
    print(f'{s[:n]}...')
else:
    print(s)
k = int(input())
s = input()
if len(s) < k:
    print(s)
else:
    s = s[0:k]
    s = s+"..."
    print(s)
k=input()
s=input()
if len(str(s)) <= int(k):
    print(s)
if len(str(s)) >= int(k):
    print(s[0:int(k)], end='...')