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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy,bisect
#from operator import itemgetter
#from heapq import heappush, heappop
#import numpy as np
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
#from scipy.sparse import csr_matrix
#from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
import sys

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
nf = lambda: float(ns())
na = lambda: list(map(int, stdin.readline().split()))
nb = lambda: list(map(float, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k=int(input())
s=list(input())
ss=("").join(s)
S=len(s)
sss=("").join(s[0:7])
if S<=k:
  print(ss)
else:
  print(sss+("..."))

Submission status: Wrong Answer

Solution code:
k=int(input())
s=list(input())
ss=("").join(s)
S=len(s)
if S<=k:
  print(ss)
else:
  print(ss+("..."))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
txt=input()
# print(type(n))
if len(txt)<n:
	print(txt)
else:
	print("%s..."%txt[:n])

Submission status: Wrong Answer

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

l = len(s)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def answer(k:int, s:str) -> str:
    if len(s) <= k:
        return s
    else:
        return s[:(k-1)] + '...'

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

print(answer(k, s))

Submission status: Wrong Answer

Solution code:
# S の長さが K 以下であれば、S をそのまま出力してください。
# S の長さが K を上回っているならば、
# 先頭 K 文字だけを切り出し、末尾に ... を付加して出力してください。

# K は 1 以上 100 以下の整数
# S は英小文字からなる文字列
# S の長さは 1 以上 100 以下

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
if n < 1 or n > 100:
    exit()

n1 = input()

i = len(n1)
if i < 1 or i > 100:
    exit()

n2 = '...'

if n > i:
    print(n1)
else:
    print(n1[:n] + n2)

Submission status: Wrong Answer

Solution code:
n = int(input())

n1 = input()

i = len(n1)

n2 = '...'

if n > i:
    print(n1)
else:
    print(n1[:n] + n2)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


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

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

Submission status: Wrong Answer

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


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

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

Submission status: Wrong Answer

Solution code:

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K = int(input('数字：'))
S = input('文字列：')


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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
'''
問題：
    英小文字からなる文字列 S があります。

    S の長さが K 以下であれば、Sをそのまま出力してください。
    S の長さが K を上回っているならば、先頭 K 文字だけを切り出し、
    末尾に ... を付加して出力してください。
'''

'''
制約：
    K は 1 以上 100 以下の整数
    S は英小文字からなる文字列
    S の長さは 1 以上 100 以下
'''

# 標準入力からK, S を取得する
k = int(input())
s = str(input())

result = ""
if len(s) <= k:
    result = s
else:
    for i in range(0, k - 1):
        result += s[i]
    result += "..."

print(result)

Submission status: Wrong Answer

Solution code:
# B - ... (Triple Dots)
# K
K = int(input())
# S
S = input()

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

print(answer)

Submission status: Wrong Answer

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

if K - len(S) >= 0:
    print(S)
else:
    print(S[0:K+1].format(...))

Submission status: Wrong Answer

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

if K - len(S) >= 0:
    print(S)
else:
    print(S[0:K].format(...))

Submission status: Wrong Answer

Solution code:
class Strs:
    def __init__(self, k, s):
        self.k = k
        self.s = s

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

k = int(input())
s = input()
strs = Strs(k, s)
print(strs)

strs.triple_dods()

Submission status: Wrong Answer

Solution code:
#168b
#値を受け取る
K = int(input())
S = str(input())

#Kになるまで文字を取り、K以降の文字列は'…'で表す
def answer(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        return S[K:] + '...'


print(answer(K, S))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

Solution code:

k=input()
s=input()

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

Submission status: Wrong Answer

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

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


else:
    print(S)

Submission status: Wrong Answer

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

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

else:
    print(S)

Submission status: Wrong Answer

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

SK = S[0 : (K)]

if len(S) <= K:
    answer = S
else:
    print(SK + '...')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(result)

Submission status: Wrong Answer

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

print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(x)

Submission status: Wrong Answer

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

print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

length = len(S)

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

Submission status: Wrong Answer

Solution code:
k,s=open(0);k=int(k);print(s[:k]+'...'*(k<len(s)))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
word = input()
ans = ""
if len(word) <= n:
  print(word)
else:
  for i in range(n):
    ans += word[i]
    ans +=("...")
  print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
word = input()
ans = ""
if len(word) < n:
  print(word)
else:
  for i in range(n):
    ans += word[i]
  ans +=("...")
  print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
word = input()
ans = ""
if len(word) < n:
  print(word)
else:
  for i in range(n):
    ans += word[i]
  print(ans + "...")

Submission status: Wrong Answer

Solution code:
n = int(input())
word = input()
ans = ""
if len(word) <= n:
  print(word)
else:
  for i in range(n):
    ans += word[i]
print(ans + "...")

Submission status: Wrong Answer

Solution code:
n = int(input())
word = input()
ans = ""
if len(word) < n:
  print(word)
else:
  for i in range(n):
    ans += word[i]
print(ans + "...")

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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)

Submission status: Wrong Answer

Solution code:
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 += 'x'
    print(result)

Submission status: Wrong Answer

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

if '__main__' == __name__:
    resolve()

Submission status: Wrong Answer

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

if k >= x:
  print(s)

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

Submission status: Wrong Answer

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

if k >= x:
  print(s)

else:
  print(s + "...")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K = input()
S = input()
LS = len(S)
IK = int(K)

if LS < IK:
    print(S)

elif LS > IK:
    print(S[0:IK] + '...')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
K=int(input())
S=list(input())
T=int(len(S))
if T>K:
    X=S[0:7]
    Y=("".join(X))
    Z=str("...")
    print(Y+Z)
else:
    print("".join(S))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K = int(input())
S = input()
print(S[:7]+'...')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
max=int(input())
retsu=input()
l=len(retsu)
if l>max:
 retsu=retsu[0:l-max-1]
 retsu+=("...")
print(retsu)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K=int(input())
S=input()
if len(S)<K or len(S)==K:
    print (S)
elif len(S)>K:
    print(S[0:K])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if len(S)<K or len(S)==K:
    print (S)
elif len(S)>K:
    print(S[K])

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
K = int(input())
S = input()
a = len(S)
if a <= K:
    print(S)
else:
    print(str(S[0:K]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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])
print("".join(news))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
def main():
    import sys

    input = sys.stdin.readline

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

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k = int(input())
s = list(input())
l = len(s)
if k >= l:
  print(s)
else:
  print(s[:k])

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
m = int(input())
k = input()
if len(k) <= m:
    print(k)
else:
    print(k[:m])

Submission status: Wrong Answer

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

S_len = len(S)

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import itertools
import math
import sys

INF = float('inf')


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


def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    K = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    print(solve(K, S))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
k = int(input())
s = input()
#a, b = map(int, input().split())
#l = list(map(int, input().split()))
#s = input()


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
k=int(input())
s=input()
print(s[:k+1]+"{0}".format("..."*(len(s)>k)))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if len(S)<=K:
    print(S)
else:
    print(S,"...")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def TripleDots():

    Num = int(input())

    moji = str(input())

    if len(moji) >= Num:
        moji_cut = moji[:Num] + '...'
        
    else:
        moji_cut = moji

    print(moji_cut)

if __name__ == '__main__':
    TripleDots()

Submission status: Wrong Answer

Solution code:
def TripleDots():

    Num = int(input())

    moji = str(input())

    if len(moji) >= Num + 3:
        moji_cut = moji[:Num] + '...'
        
    else:
        moji_cut = moji

    print(moji_cut)

if __name__ == '__main__':
    TripleDots()

Submission status: Wrong Answer

Solution code:
def TripleDots():

    Num = int(input())

    moji = str(input())

    if len(moji) >= Num + 3:
        moji_cut = moji[:Num] + '...'
        
    #elif len(moji) == Num + 2:
    #    moji_cut = moji[:Num] + '..'
        
    #elif len(moji) == Num + 1:
    #    moji_cut = moji[:Num] + '.'
        
    else:
        moji_cut = moji[:Num]

    print(moji_cut)

if __name__ == '__main__':
    TripleDots()

Submission status: Wrong Answer

Solution code:
def TripleDots():

    Num = int(input())

    moji = str(input())

    if len(moji) >= Num + 3:
        moji_cut = moji[:Num] + '...'
        
    elif len(moji) == Num + 2:
        moji_cut = moji[:Num] + '..'
        
    elif len(moji) == Num + 1:
        moji_cut = moji[:Num] + '.'
        
    else:
        moji_cut = moji[:Num]

    print(moji_cut)

if __name__ == '__main__':
    TripleDots()

Submission status: Wrong Answer

Solution code:
N=int(input())
a=input()
i=0
he=""
if len(a)>N:
    for m in range(N):
        he=he+a[i]
        i=i+1
    he=he+"..."
print(he)

Submission status: Wrong Answer

Solution code:
N=int(input())
a=input()
i=0
he=""
if len(a)>N:
    for m in range(N):
        he=he+a[i]
        i=+1
    he=he+"..."
print(he)

Submission status: Wrong Answer

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

if len(s) <= k:
    print(s)
elif len(s) > k:
    print(s[:k - 1] + '...')

Submission status: Wrong Answer

Solution code:
K = int(input())
S = input()
ans = ""
if K >= len(S):
    print(S)
else:
    for i in range(K):
        ans += S[i]
    print(ans + "…")

Submission status: Wrong Answer

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

if len(s) <= k:
  print(s)
elif len(s) > k:
  print(s[0:k-1] + '...')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
T=int(input())
S=str(input())
s=len(S)
if s<T:
    print(S)
else:
    print(S+'...')

Submission status: Wrong Answer

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

print(len(s))

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input())
b=input()
if a>len(b):
  print(b)
else:
  print(b[0:a],"...")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=input()
b=input()
c=b[:int(a)]
if len(b)>int(a):
    print(c,". . .")
else:
    print(c)

Submission status: Wrong Answer

Solution code:
a=input()
b=input()
c=b[:int(a)]

print(c,". . .")

Submission status: Wrong Answer

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


print (S[:K], "...",sep="")# to print only the K number of the string

Submission status: Wrong Answer

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


print (S[:K], "...",sep="")