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.



Sample input:
7
nikoandsolstice


Sample output:
nikoand...

Submission status: Accepted

Solution code:

import numpy as np
from functools import *
import sys
sys.setrecursionlimit(100000)

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

s_length = int(len(s))

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

Submission status: Accepted

Solution code:
import math
# import numpy as np
import sys

def Next(): return input()
def NextInt(): return int(Next())
def NextInts(): return map(int,input().split())
def Nexts(): return map(str,input().split())
def NextIntList(): return list(map(int,input().split()))
def RowInts(n): return [input() for i in range(n)]


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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

B = list(S)

L = len(S)


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

Submission status: Accepted

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

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

Submission status: Accepted

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

l = len(s)

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
K = int(input())
S = input()

count = len(S)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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] + '...')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
s=input()
score=''
if n>=len(s):
	print(s)
else:
	for i in range(n):
		score+=s[i]
	print("{}...".format(score))

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
k =int(readline().rstrip().decode())
n = readline().rstrip().decode()
if len(n) > k:
  print(n[:k] + "...")
else:
  print(n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
S = input()
if len(S) <= K:
    print(S)
elif len(S) > K:
    for i in range(K + 1):
        if i == K:
            print('...')
        else:
            print(S[i], end = '')

Submission status: Accepted

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

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

Submission status: Accepted

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

if len(s) <= k:
    print("".join(map(str, s)))
else:
    b = list(s[0:k])
    ans = map(str, b)
    aa = "".join(b)
    print(aa+"...")

Submission status: Accepted

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

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

Submission status: Accepted

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

a = len(s)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def SS(): return map(str,sys.stdin.readline().rstrip().split())
def II(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

K = I()
s = S()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

s = len(S)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
limit = int(input())
original = input()
if(int(len(original))>limit):
  print(original[0:limit]+ "..." )
else:
  print(original)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
s = input()
slen = len(s)

if(slen>k):
    str=s[0:k]+"..."
else:
    str=s

print(str)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())
word = input()
length = int(len(word))
new_word = ""
if num >= length:
  print(word)
else:
  for n in range(0, num):
    new_word += word[n]
  print(new_word +"...")

Submission status: Accepted

Solution code:
K=int(input())
S=input()
if len(S)<=K:
    print(S)
else:
    D=list(S)
    del D[K:]
    D.append("...")
    print(*D, sep="")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#B
K = int(input())
S = str(input())

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

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
b = input()
if len(b) <= a[0]:
  print(b)
else:
  print(b[0:a[0]]+"...")

Submission status: Accepted

Solution code:
k=int(input())
s=input()
l=len(s)
if l<=k:
  print(s)
else:
  p=s[0:k]
  q='...'
  r=p+q
  print(r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K = int(input())
S = list(input())
newS = []

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

print("".join(newS))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

s = input()

if len(s) <= N:
  print(s)
else:
  print(s[:N], end='...\n')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())
String = str(input())
if len(String)> num:
    print(f"{String[0:num]}...")
else:
    print(String)

Submission status: Accepted

Solution code:
N = int(input())
A = input()

if len(A) > N:
  print(A[:N]+"...")
else:
  print(A)

Submission status: Accepted

Solution code:
k = int(input())

s = input()


if k < len(s):  ##以上の時
    print(s[:k] + "...")
else:
    print(s)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#n, m, q = map(int, input().split())
#List = list(map(int, input().split()))
#req = [list(map(int, input().split())) for _ in range(q)]
#t = t[:-1]
k = int(input())
s = input()

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

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

    print("...")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = input()
S = input()

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

Submission status: Accepted

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

s = len(S)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

if K<len(S):
    del S[K:len(S)]
    S.append('...')
print(''.join(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    k = int(input())
    s = input()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
m = input()

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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 + "...")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
length = int(input())

# 文字列の入力
string = input()

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*-  coding:utf-8 -*-

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

l = len(s)

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

Submission status: Accepted

Solution code:
K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  s = S[0]
  for i in range(1,K):
    s += S[i]
  s += '...'
  print(s)

Submission status: Accepted

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

Y = S[:K]
if S!=Y:
	Y = Y + '...'
print(Y)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()

a=""
i=0
if len(S) <= N:
   print(S)
else:
   for i in range(N):
      b = S[i]
      a = a + b
   a = a + "..."
   print(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def a():
    n = int(input()) % 10
    if n == 2 or n == 4 or n == 5 or n == 7 or n == 9:
        print('hon')
    elif n == 3:
        print('bon')
    else:
        print('pon')




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

# def c():
    

# def d():


b()

Submission status: Accepted

Solution code:
#B - ... (Triple Dots)

K = int(input())
S = input()
lis = []

if len(S) <= K:
    print(S)
elif len(S) > K:
    for i in range(K):
        lis.append(S[i])
    lis.append("...")
for i in lis:
    print(i, end ="")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
S=input()
lS = list(S)

if len(lS)>K:
  print(''.join(lS[0:K])+'...')

else:
  print(S)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
s = input()
s_len = len(s)

if s_len <= N:
    print(s)
else:
    print(s[:N]+'...')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
words = str(input())
if len(words) <= n:
  print(words)
else:
  print(words[0:n] + "...")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
num = int(input())
str = input()
if len(str) <= num:
        print(str)
else:
        print(str[:num] +  "...")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k = int(input())
s = str(input())
# print(k,s)
len_s = len(s)
# print(len_s)
s_k = s[:k]
# print(s_k)

dots = "."*3

if len_s <= k:
    print(s)
else:
    print(s_k+dots)

Submission status: Accepted

Solution code:





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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

str_list = []
for line in sys.stdin:
  str_list.append(line.strip("\n"))

if len(str_list[1]) > int(str_list[0]):
  print("{}...".format(str_list[1][:int(str_list[0])]))
else:
  print(str_list[1])

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math

#tmp = input().split()
#n,m = list(map(lambda a: int(a), tmp))

k = int(input())
s = input()
#tmp = input().split()
#n,m,k = list(map(lambda a: int(a), tmp))


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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def N(): return int(input())
def NM():return map(int,input().split())
def L():return list(NM())
def LN(n):return [N() for i in range(n)]
def LL(n):return [L() for i in range(n)]
def YesNo(x):print("Yes")if x==True else print("No")
k=N()
s=input()
if len(s)<=k:
    print(s)
else:
    print(s[:k]+"...")

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K = int(input())

S = input()

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

Submission status: Accepted

Solution code:
from sys import stdin

k = int(stdin.readline())
n = stdin.readline().rstrip()

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

Solution code:
K = int(input())
S = str(input()).lower()
if K>1 or K<100 or len(S)<1 or len(S)>100:
    if len(S)>K:
        print(f"{S[0:K]}...")
    else:
        print(S)
else:
    pass

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
s = list(input())
if len(s) <= k:
    k_r = ''.join(s)
    print(k_r)
else:
    s_r = ''.join(s[0:k])
    print(s_r + "...")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
a=int(input())
b=input()
i=0
while i<a and i<len(b):
    print(end=str(b[i]))
    i=i+1
if len(b)>a:
    print(end='...')

Submission status: Accepted

Solution code:
k=input()
s=input()
result=len(s)
if result<=int(k):
  print(s)
elif result>int(k):
  a=s[0:int(k)]+'...'
  
  print(a)

Submission status: Accepted

Solution code:
a=int(input())
s=input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K=int(input())
S=input()
if len(S)<= K:
  print(S)
else:
  print(S[:K],end="")
  print("...")

Submission status: Accepted

Solution code:

def main():
    K = int(input())
    S = input()
    if len(S) <= K:
        print(S)
    else:
        print(S[:K] + "...")
 
 
if __name__ == '__main__':
    import sys
    sys.setrecursionlimit(10000)
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k = int(input())
moji = str(input())
length = int(len(moji))
if length <= k:
  print(moji)
else:
  moji2 = moji[0:k]
  print(moji2 + "...")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
  K = int(input())
  S = str(input())

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

if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

N = len(S)

if N > K:
    for i in range(K):
        print(S[i],end="")
    print("...")
else:
    print(S)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(K, S):
    if len(S) <= K:
        print(S)
    else:
        print(S[0:K] + "...")

k, S = open(0).read().split()
K = int(k)
solve(K, S)

Submission status: Accepted

Solution code:
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(3)]
    s += "".join(a)
    ans = s
else:
    ans = s
print(s)

Submission status: Accepted

Solution code:
n = int(input()) 

s=input()
st=""
for i in s[:n]:
    st=st+i

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

Submission status: Accepted

Solution code:
k = int(input())
s = input()
a = ""
flag = False
if k < len(s):
    for i in range(k):
        a = a + s[i]
    a = a + "..."
    flag = True
if flag:
    print(a)
else:
    print(s)

Submission status: Accepted

Solution code:
K = input()
S = input()

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

elif int(K) <= len(S):
    print(S[0:int(K)]+'...')

Submission status: Accepted

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations, combinations_with_replacement
from heapq import heappop, heappush
from fractions import gcd
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

def main():
    k = inp()
    t = list(input())
    n = len(t)
    if n <= k:
        print(''.join(t))
        return
    ans = []
    for i in range(k):
        ans.append(t[i])
    for i in range(3):
        ans.append('.')
    print(''.join(ans))
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if  len(s)<= k :  #abが２で割り切れたら、Evenと入力
    print(s[0:])  


else :           #それ以外なら,Oddと入力
    print('{}...'.format(s[0:k]))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = input()
S = input()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
count = int(input())
line = input()
rang = len(line)
if rang > count:
    print(line[:count] + "...")
    
else:
    print(line)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if len(s) <= k:
  print(s)
else:
  a = 0
  for i in s:
    if a < k:
      print(i, end="")
      a += 1
    else:
      break
  print("...")

Submission status: Accepted

Solution code:
#整数の入力
K = int(input())
#文字列の入力
S = input()
S_list  = list(S)

if(len(S_list)<=K):
  print(S)
else:
  del S_list[K:len(S_list)]
  L=''.join(S_list)
  print(L+"...")