peterverebics/CodeNet_Python_118 huggingface dataset:
N = str(input())
if N[-1] == 3:
  print("bon")
elif N[-1] == 0 or N[-1] == 1 or N[-1] == 6 or N[-1] == 8:
  print("pon")
else:
  print("hon")
N = int(input("enter your number"))
num = str(N)
n = (num[-1])

if N >= 999:
    print("error")
else:
    if n == "2" or n == "4" or n == "5" or n == "7" or n == "9":
        print("hon")
    elif n == "0" or n == "1" or n == "6" or n == "8":
        print("pon")
    elif n == "3":
         print("bon")
N = int(input())
number1 = [2,4,5,7,9]
number2 = [3]
number3 = [0,1,6,8]
if N % 10 in number1:
    print(str(N) + 'hon')
elif N % 10 in number2:
    print(str(N) + 'bon')
elif N % 10 in number3:
    print(str(N) + 'pon')
N = int(input(''))
if N % 10 == 0 or 1 or 6 or 8:
    print('pon')
elif N % 10 == 3:
    print('bon')
else:
    print('hon')
n = int(input())

if n%10 == 3:
    print("bon")
elif n%10 == 0 or 1 or 6 or 8:
    print("pon")

else :
    print("hon")
N = input()
if N == 2:
    print('hon')
elif N == 4:
    print('hon')
elif N == 5:
    print('hon')
elif N == 7:
    print('hon')
elif N == 9:
    print('hon')
elif N == 3:
    print('bon')
else:
    print('pon')
def cal():

    num = int(input())
    ben = num % 10
    if ben == 3:
        print("bon")
    elif ben == 0 or 1 or 6 or 8:
        print("pon")
    elif ben == 2 or 4 or 5 or 7 or 9:
        print("hon")



cal()
n = input()
h = (2,4,5,7,9)
p = (0,1,6,8)
b = 3
m = int(n) % 10
if m in h:
  print("bon")
if m in p:
  print("pon")
if m == b:
  print("hon")
n=int(input())
if n==3:
  print("bon")
elif n==0 or n==1 or n==6 or n==8:
  print("pon")
else:
  print("hon")
s=input()
if s[-1]==2 and s[-1]==4 and s[-1]==5 and s[-1]==7 and s[-1]==9:
    print('hon')
elif s[-1]==0 and s[-1]==1 and s[-1]==6 and s[-1]==8:
    print('pon')
else:
    print('bon')
con1 = [2, 4, 5, 7, 9]
con2 = 3

n = int(input())
if n in con1:
  print('hon')
  
elif con2 == n:
  print('bon')
  
else:
  print('pon')
a = input()
b = (a[-1])

if b in [2, 4, 5, 7, 9]:
    print("hon")
elif b in [0, 1, 6, 8]:
    print("pon")
else:
    print("bon")
n=input()
print(n[-1])
if n[-1]=='3':
  print('bon')
elif n[-1]=='0' or n[-1]=='1' or n[-1]=='6' or n[-1]=='8':
  print('pon')
else:
  print('hon')
N = input()

print(N[-1:])
if (N[-1:] == '2')|(N[-1:] == '4') | (N[-1:] == '5') |(N[-1:] == '7') |(N[-1:] == '9'):
    print("hon")
elif (N[-1:] == '0') | (N[-1:] == '1') | (N[-1:] == '6') | (N[-1:] == '8'):
    print("pon")
else :
    print("bon")
N = input()
l = len(N)

if N[l-1] == '2'or'4'or'5'or'7'or'9':
  result = 'hon'
if N[l-1] == '0'or'1'or'6'or'8':
  result = 'pon'
if N[l-1] == '3':
  result = 'bon'

print(result)
N = input()

s = str(N)
if s[-1] == 2 or s[-1]== 4 or s[-1]== 5 or s[-1]== 7 or s[-1]== 9:
    print("hon")
elif s[-1]== 0 or s[-1]== 1 or s[-1]== 6 or s[-1]== 8:
    print("pon")
else:
    print("bon")
N = input()

print(N,N[-1])
l = ["0","1","6","8"]
if N[-1]=="3":
    print("bon")
elif N[-1] in l:
    print("pon")
else:
    print("hon")
n = str(input())
length = int(len(n))
num = int(n[length-1])
if num == 2 or num == 4 or num == 5 or num == 7 or num == 9:
  print("pon")
elif num == 0 or num == 1 or num == 6 or num == 8:
  print("hon")
else:
  print("bon")
a = (str(input()))
b= a[-1]

if b ==2 or 4 or 5 or 7 or 9:
  print("hon")

elif b==0 or 1 or 6 or 8:
  print("pon")

else:
  print("bon")
N = input()

if N[-1] == ('2' or '4' or '5' or '7' or '9'):
    print('hon')
elif N[-1] == ('0' or '1' or '6' or '8'):
    print('pon')
else:
    print('bon')
N = input()
if N[-1] == 2 or 4 or 5 or 7 or 9:
    print("hon")
elif N[-1] == 0 or 1 or 6 or 8:
    print("pon")
elif N[-1] == 3:
    print("bon")
num = int(input())

honlist = [2,4,5,7,9]
ponlist = [0,1,6,8]
bonlist = [3]

if num in honlist:
    print("hon")
elif num in ponlist:
    print("pon")
else:
    print("bon")
x = input()
N = int(x)

if N % 10 == 2 or N % 10 == 4 or N % 10 == 5 or N % 10 == 7 or N % 10 == 9:
    print('hon')
if N % 10 == 3:
    print('bon')
else:
    print('pon')
from sys import stdin, stdout
for _ in range(1):#int(stdin.readline())
    n=int(stdin.readline())
    n%=10
    if n in {2,5,7,9,5}:print('hon')
    elif n in {0,1,6,8}:print('pon')
    else:print('bon')
n = str(input())
hon = [2,3,5,7,9]
pon = [0,1,6,8]
bon = [3]
if int(n[-1]) in hon:
    print('hon')
elif int(n[-1]) in pon:
    print('pon')
else:
    print('bon')
N = int(input())

def mod(x):
  a = x%10
  return a

if mod(N)==(2 or 4 or 5 or 7 or 9):
  print("hon")
elif mod(N)==(0 or 1 or 6 or 8):
  print("pon")
elif mod(N)==3:
  print("bon")
if __name__ == "__main__":
    n = int(input())
    tmp = n // 10
    if tmp == 2 or tmp == 4 or tmp == 5 or tmp == 7 or tmp == 9:
        print('hon')
    elif tmp == 3:
        print('bon')
    else:
        print('pon')
n = input()
if(n[-1] == "3"):
	print("bon")
elif(n[-1] == "0" or n[-1] == "1" or n[-1] == "6" or n[-1] == "8"):
	print("pon")
else:
	print("pon")
N = int(input('number->'))
a = N % 10
print(a)
if a == 2 or a==4 or a==5 or a==7 or a==9:
    print('hon')
elif a == 0 or a==1 or a==6 or a==8:
    print('pon')
else:
    print('bon')
n = int(input())

if n%10 == 3:
    print("bon")
elif n%10 == 0 or n%10 == 1 or n%10 == 6 or n%8 == 8:
    print("pon")
else:
    print("hon")
pen = input()[-1]

if pen == (2 or 4 or 5 or 7 or 9):
    print('hon')
elif pen == (0 or 1 or 6 or 8):
    print('pon')
elif pen == 3:
    print('bon')
N = input()
if N[0] in ['0', '1', '6', '8']:
  print("pon")
elif N[0] == '3':
  print("bon")
else:
  print("hon")
# -*- coding: utf-8 -*-

n = str(input())

hon = ['2', '4', '5', '7', '9']
pon = ['0', '1', '6', '8']
bon = ['3']

print(n[-1])

if n[-1] in hon:
    print('hon')
elif n[-1] in pon:
    print('pon')
else:
    print('bon')
import sys


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


MOD = 10 ** 9 + 7
sys.setrecursionlimit(20000000)
INF = float("inf")


def main():
    K = int(input())
    S = list(input())
    if len(S) <= K:
        print(*S, sep="")
    else:
        answer = S[:K] + ["..."]
        print(*answer, sep="")


if __name__ == "__main__":
    main()
def mp(): return map(int, input().split())
def lmp(): return list(map(int, input().split()))

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:
    s_list = list(S)[0:K]
    print("".join(s_list)+"...")
datanum = int(input())
mojiretu = input()

if len(mojiretu) <= datanum:
  print(mojiretu)
  
else:
  print(mojiretu[:datanum] + "...")
k = int(input())
s = input()
if len(s) <= k:
  print(s)
else:
  print("{}...".format(s[:k]))
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=input()
if len(s)<=k:
    print(s)
else:
    for i in range(k):
        print(s[i],end="")
    print("...",end="")
from sys import stdin
import sys

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


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

if len(S) <= K:
    ans = S
else:
    ans = S[:K] + '...'
print(ans)
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 + 1:
    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[:K] + '...')
else:
    print(S)
K=int(input())
S=list(input())
T=int(len(S))
if T>K:
    X=S[0:K]
    Y=str("".join(X))
    Z=str("...")
    print(Y+Z)
else:
    print("".join(S))
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    print(S[:K] + "...")
def main():
    num = int(K)
    if num >= len(S):
        print(S)
    else:
        print(S[:num]+'...')

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

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

if '__main__' == __name__:
    resolve()
#168 B
K = int(input())
S = input()

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


#168 A
#n_last = int(list(input())[-1])

#if n_last in [3]:
#	print('bon')
#elif n_last in [0,1,6,8] :
#	print('pon')
#else:
#	print('hon')
k = int(input())
s = input()
sl = len(s)

if k >= sl:
    print(s)
else:
    print(s[0:k]+'...')
length = int(input())
s = input()

if len(s) <= length:
  print(s)
else:
  print(s[:length]+'...')
k = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    print(s[:k]+'...')
# coding: utf-8
K = int(input())
S = input()

if len(S) <= K:
    print(S)
else:
    print(S[:K] + '...')
import sys
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]+'...')
# coding: utf-8


def solve(*args: str) -> str:
    k = int(args[0])
    S = args[1]

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


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))
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:
  S = S[:K] + "..."
  
print(S)
k = int(input())
s = input()

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

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

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

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

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

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

else:
    s = s[0:k] + "..."
    print(s)
k = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    str_k = ''
    for i in range(k):
        str_k = str_k + s[i]
    print(str_k + '...')
# K = int(input())
# S = input()

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

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

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

print(answer(K, S))
k = int(input())
s = input()
ls = len(s)

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

# print(len(s))

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

def s_in():
    return input()

def n_in():
    return int(input())

def l_in():
    return list(map(int, input().split()))

k=n_in()
s=s_in()

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]+'...')
K = int(input())
S = input()

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

input = sys.stdin.readline


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


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

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

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

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

if len(S) > K:
  print(S[:K] + '...')
else:
  print(S)
K = int(input())
S = list(input())
if len(S) > K:
    ans = S[0:K]
    ans.append("...")
    print("".join(ans))
else:
    print("".join(S))
K = int(input())
S = str(input())
if len(S) <= K:
    print(S)
else:
    print('{}...'.format(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(S)
    else:
        s = S[:K]
        print(s + "...")


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

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

print(ans)
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:
    ans = s[0:k]+'...'
    print(ans)
# coding: utf-8
# Your code here!

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

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

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

print(answer)
K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  print(S[:K]+"...");
import math
import collections
K = int(input())
S = input()
L = list(S)
if len(L) <= K:
  print(S)
else:
  M = L[:K]
  print(''.join(M)+'...')
k = int(input())
s=input()

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

if k >= len(s):
    print(s)
else:
    tmp = s[0:k]
    tmp = tmp + "..."
    print(tmp)
k =int(input())
s =input()
ans = ''
if k>len(s):
  k = len(s)
for i in range (k):
  ans = ans+s[i]

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

if len(s) <= k:
    print(s)
elif len(s) > k:
    print(s[: k] + '...')
k=int(input())
s=[i for i in input()]

ans=0

if len(s)<=k:
  ans="".join(s)
else:
  ans="".join(s[:k])+"..."
  
print(ans)
# B - ... (Triple Dots)
def main():
    K = int(input())
    S = input().rstrip()
    print(S if len(S) <= K else S[:K] + "...")


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

S = input()

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

if len(s) > max_len:
    print(f"{s[:max_len]}...")
else:
    print(s)
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    print(S[:K] + '...')
def B():
    k = int(input())
    s = input()
    if k<len(s):
        print(s[:k] + "...")
    else:
        print(s)
    
B()
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 = list(input())

print("".join(s[:k]) + ("..." if len(s) > k else ""))
K=int(input())
S=input()
if len(S)<=K:
    print(S)
else:
    D=list(S)
    del D[K:]
    D.append("...")
    print(*D, sep="")
#!/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)
    #for i in range(3):
    #    change = change.replace(change[i], '.')
    #print(S[:K] + change[:3])
k=int(input())
s= input()
if(len(s)<=k):
    print(s)
else:
    print(s[:k]+"...")
K = int(input())
S = input()

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

print(ans)
n = int(input())
l = list(input())
if len(l) <= n:
    print("".join(l))
elif len(l) > n:
    del l[n:]
    print("".join(l) + "...")
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('{}...'.format(s[:k]))
k=int(input())
s=input()
if len(s)<=k:
    print(s)
else:
    print(s[:k]+"...")
def actual(k, s):
    if len(s) > k:
        return f'{s[:k]}...'

    return s

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

print(actual(k, s))
k=int(input())
s=input()
n=len(s)
if k>=n:
  print(s)
else:
  ans =""
  for i in range(k):
    ans+=s[i]
  ans+="..."
  print(ans)
def main():
  num = int(input())
  string = input()
  if len(string)<=num:
    print(string)
  else:
    print(string[0:num]+'...')

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

S_len = len(S)

if len(S)<=K:
    print(S)
else:
    print(S[0:K]+'...')
K=int(input())
S=str(input())
if K>=len(S):
    print(S)
else:
    print(S[0:K]+"...")
def main():
    K, S = open(0).read().split()
    K = int(K)

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

    print(ans)
    return(ans)


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

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

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

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

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

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

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

if len(S) <= K:
    print(S)
else:
    print(S[0:K] + '...')
#!/usr/bin/env python3
import sys


input = sys.stdin.readline
def IS(cb): return cb(input().strip())
def IL(cb): return [cb(s) for s in input().strip().split()]
def IR(cb, rows): return [IS(cb) for _ in range(rows)]
def ILL(cb, rows): return [IL(cb) for _ in range(rows)]


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


solve()
#!/usr/bin/env python3
import sys
import collections

sys.setrecursionlimit(10 ** 7)

# 1 ✕ 1 (int)
K = int(input().rstrip())

# 1 ✕ 1 (str)
S = input().rstrip()

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

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

if K >= len(S):
    print(S)
else:
    S = S[0:K]
    print(S + "...")
from sys import stdin
K = int(stdin.readline().rstrip())
S = stdin.readline().rstrip()
ans = S[:K]
if len(S) > K:
  ans += '...'
print(ans)
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)
k = int(input())
s = input()

if len(s) <= k:
    print(s)
else:
    print(f"{s[:k]}...")
k = int(input())
s = input()
i = ""
if len(s) <= k:
    print(s)
else:
    for j in range(k):
        i = i + s[j]
    print(i+"...")
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)
k=int(input())
s=input()
len_s=len(s)
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
INF = 1 << 60
MOD = 10**9 + 7 # 998244353
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    k = int(input())
    S = input()
    if len(S) <= k:
        print(S)
    else:
        print(S[:k] + "...")
resolve()
K = int(input())
S = input()

aa = []

if len(S) <= K:
  print(S)
else:
  for x in range(K):
    aa.append(S[x])
  print("".join(aa) + "...", sep = "")
k=input()
n=int(k)
s=input()
a=len(s)

if a>n:
    print(s[0:n] +"...")

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

if K >= len(S):
    print(''.join(S))

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

result = ""

if len(S) <= K:
  result = S
else:
  result = S[0:K] + "..."
  
print(result)
import sys
sys.setrecursionlimit(300000)

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


K = I()
S = input()

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

t = ''
if len(S) > K:
    t = '...'

print(S[:K] + t)
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:
    a = S[0:K] + '...'
    print(a)
else:
    print(S[0:K])
k=int(input())
s=list(input())
if len(s)<=k:
	print(*s,sep="")
else:
    s=s[0:k]+["..."]
    print(*s,sep="")
K = int(input())
S = input()

len_S = len(S)

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

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

print(s if len(s) <= k else s[:k] + '...')
num=int(input())
line=list(input())
if len(line)>num:
  line=line[:num]
  line.append("...")
linemap = map(str, line)
line = ''.join(linemap)
print(line)
K = int(input())
S = input()
if len(S)<=K:
    print(S)
else:
    print(S[0:K] + "...")
# -*- coding: utf-8 -*-
k = int(input())
s = input()

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

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

if len(s)<=k:
    print(s)
else:
    s_s=s[:k]
    print(s_s+'...')
n = int(input())
s = input()
if len(s) <= n:
    print(s[:n])
else:
    print(s[:n]+"...")
k = int(input())
s = list(str(input()))
if len(s) <= k:
    print(''.join(s))
else:
    ln = s[:k]
    ln.append('.')
    ln.append('.')
    ln.append('.')
    print(''.join(ln))
k = int(input())
s = input()
L = len(s)
if L <= k:
    print(s)
else:
    ans = s[:k]+'...'
    print(ans)
K = int(input())
S = input().strip()

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

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

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


def input_list():
    return list(map(int, input().split()))


if __name__ == '__main__':
    main()
k = int(input())
s = input()
if len(s) <= k:
    print(s)
    raise SystemExit(0)
print(s[:k] + "...")