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 k > len(s):
    print(s)

else:
    out = s[:k] + '...'
    print(out)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


if __name__ == "__main__":
    main()

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

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

Submission status: Wrong Answer

Solution code:
x = input()
y = input()
z = len(y)
if z <= int(x):
  print(y)
else:
  print(y[:int(x)])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(S[:K])

Submission status: Wrong Answer

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

#print(K)
#print(S)

out = []

if len(S) <= K:
    out = S
else:
    for i in range(K):
        out.append(S[i])


for ans in out:
    print(ans, end = "")

Submission status: Wrong Answer

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

# print(K)
# print(S)

out = []

if len(S) <= K:
    out = S
else:
    for i in range(K):
        out.append(S[i])


for ans in out:
    print(ans, end = "")

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 k == len(s):
    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(s[:k]+"."*(len(s) - k))

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n= int(input())
a = input()
g = "..."
if n == len(a):
  g =" "
print(a[0:n] + g)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(answer)

Submission status: Wrong Answer

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

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-1]+"...")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# sys.stdin.readline()
import math
import sys
from collections import defaultdict
input = sys.stdin.readline
k= int(input())
s= input()
if  len(s) > k:
    print((s[0:k] + "...") )
else:
    print(s)

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=input()
if(k>len(s)):
  print(s)
else:
  print(s[0:k],"...")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def main():
    import sys
    length = int(sys.stdin.readline())
    string = sys.stdin.readline()

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
K = int(input())
S = input()
s = ""
for x in range(min(len(S),K)):
  s += S[x] 
if len(S) >= K:
   print(s + "...")
else:
   print(s)

Submission status: Wrong Answer

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

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:
K = int(input())
S = input()
s = len(S)

if s <= K:
  print(S)
if s > K:
  print(S + '...')

Submission status: Wrong Answer

Solution code:
n=int(input())

s=input()

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

Submission status: Wrong Answer

Solution code:
inputk = input()
k = int(inputk)
s = input()
#len()は文字数取得
if(len(s) <= k): print(s)
else: print(s[0 : k - 1] + "...")

Submission status: Wrong Answer

Solution code:
inputk = input()
k = int(inputk)
s = input()
#len()は文字数取得
if(len(s) <= k): print(s)
else: print(s[1:k] + "...")

Submission status: Wrong Answer

Solution code:
import sys
K = int(sys.stdin.readline())
S = list(sys.stdin.readline())
if K >= len(S):
    print(''.join(S))
    
else:
    s = ''.join(S[:K])
    print(f'{s}...')

Submission status: Wrong Answer

Solution code:
from collections import defaultdict, deque
import sys
import heapq
import bisect
import itertools
import queue
import copy
import time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))

def inpl_str(): return list(sys.stdin.readline().split())

def inpl_strl(): return list(sys.stdin.readline())

K = inp()
S = inpl_strl()
if K >= len(S):
    print(''.join(S))
else:
    s = ''.join(S[:K])
    print(f'{s}...')

Submission status: Wrong Answer

Solution code:
from sys import stdin, stdout
from collections import deque, defaultdict
import math as m

rl = lambda: stdin.readline()
rll = lambda: stdin.readline().split()
rli = lambda: map(int, stdin.readline().split())

INF, NINF = float('inf'), float('-inf')

def main():
	k = int(rl())
	s = rll()[0]
	print(s)
	if len(s) > k:
		print("".join([s[:k], "..."]))
	else:
		print(s)
	stdout.close()

if __name__ == "__main__":
	main()

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:
K = int(input())
S = input()

print(S[0:K]+"...")

Submission status: Wrong Answer

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

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

moji("S",K)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k=int(input())
print(input()[:k])

Submission status: Wrong Answer

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

S_len = len(S)

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

if(S_len >= K):
    print(S[0:K] + "...")

Submission status: Wrong Answer

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

S_len = len(S)

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

if(S_len >= K):
    print(S[0:K] + "…")

Submission status: Wrong Answer

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

S_len = len(S)

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

if(S_len >= K):
    print(S[0:K-1] + "…")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K = int(input())
S = input()
if (len(S) <= K):
  print(S)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())
s = int(str(N)[-1])

if s in (2, 4, 5, 7, 9):
    print("hon")
elif s in (0, 1, 6, 8):
    print("pon")
else:
    print("bon")

Submission status: Wrong Answer

Solution code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left
from functools import reduce
input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    k = i_input()
    s = s_input()

    len_s = len(s)

    if len_s <= k:
        print(s)
        exit()

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

    print('...')    

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())

b = input()
if len(b) <= a:
  print(b)
else:
  b = []
  
  g = len(b)
  
  for i in range(0,g-1):
    print("{}".format(list[i]),end="")
    print('...')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

leng = len(S)
print(leng)

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

print(word)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

K = int(K)

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

elif (len(S) > K):
    M = S[K:]
    print(M + "...")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if S.islower() and len(S) < K and len(S) <= 1 and len(S) >= 100:
    print(S)
elif S.islower() and len(S) > K and len(S) <= 1 and len(S) >= 100:
    print(f"{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.lower())< k:
    print(s)
else:
    print(s.lower()[:k]+'...')

Submission status: Wrong Answer

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

if S.islower() and len(S) < K and len(S) <= 1 and len(S) >= 100 and K <= 1 and K >= 100:
    print(S)
elif S.islower() and len(S) > K and len(S) < 1 and len(S) > 100 and K <= 1 and K >= 10:
    print(f"{S[0:K]}{'...'}")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if S.islower() and len(S) < K and len(S) < 1 and len(S) > 100:
    print(S)
elif S.islower() and len(S) > K and len(S) < 1 and len(S) > 100:
    print(f"{S[0:K]}{'...'}")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if S.islower() and len(S) < K:
    print(S)
elif S.islower() and len(S) > K:
    print(f"{S[0:K]}{'...'}")

Submission status: Wrong Answer

Solution code:
x = int(input())
y = input()
z = len(y)
if z<=x:
  print(y)
if z>x:
  for i in range(0,x-1):
    print(y[i],end='')
  print("...",end='')

Submission status: Wrong Answer

Solution code:
k=int(input())
s=input()
if len(s)<=k:
  print(k)
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:
a = int(input())
b = input()
print(b[:a]+'...')

Submission status: Wrong Answer

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

if len(S) < K:
    print(S)
elif len(S) > K:
    print(f"{S[0:K]}{'...'}")

Submission status: Wrong Answer

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

if len(s) <= k:
  print(s)
else: 
  for j in range(k):
    i = i + s[j]
    print(i + '...')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K=int(input())
S=list(input())
if len(S)>=K:
  answer=[]
  for i in range(K):
    answer.append(S[i])
  answer.append('...')
  s=''
  for i in range(len(answer)):
    s+=answer[i]
  print(s)
else:
  g=''
  for i in range(len(S)):
    g+=S[i]
  print(g)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K=int(input())
S=list(input())
if len(S)>=K:
  answer=[]
  for i in range(K):
    answer.append(S[i])
  answer.append('...')
  s=''
  for i in range(len(answer)):
    s+=answer[i]
  print(s)
  print(1)
else:
  g=''
  for i in range(len(S)):
    g+=S[i]
  g+='...'
  print(g)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K=int(input())
S=list(input())
answer=[]
if len(S)>K:
  for i in range(K):
    answer.append(S[i])
  answer.append('...')
  s=''
  for i in range(len(answer)):
    s+=answer[i]
  print(s)
else:
  g=''
  for i in range(len(S)):
    g+=S[i]
  g+='...'
  print(g)

Submission status: Wrong Answer

Solution code:
K = int(input())
S = str(input().lower())
if len(S) <= K:
    print(S)
elif len(S) > K:
    stol = list(S)
    stol[K-1] = "..."
    Cutlist = stol[0:K]
    LtoS = ''.join(map(str, Cutlist))
    print(LtoS)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
w=input()
wordlength=len(w)
if n>=wordlength: print(w)
else: print(w[:n])

Submission status: Wrong Answer

Solution code:
K=int(input())
S=list(input())
answer=[]
if len(S)>=K:
  for i in range(K):
    answer.append(S[i])
  answer.append('...')
  s=''
  for i in range(len(answer)):
    s+=answer[i]
  print(s)
else:
  g=''
  for i in range(len(S)):
    g+=S[i]
  g+='...'
  print(g)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K=int(input())
S=list(input())
answer=[]
if len(S)>=K:
  for i in range(K):
    answer.append(S[i])
  answer.append('...')
  s=''
  for i in range(len(answer)):
    s+=answer[i]
  print(s)
  print(1)
else:
  g=''
  for i in range(len(S)):
    g+=S[i]
  g+='...'
  print(g)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K=int(input())
S=list(input())
answer=[]
if len(S)>=K:
  for i in range(K):
    answer.append(S[i])
  answer.append('...')
  s=''
  for i in range(len(answer)):
    s+=answer[i]
  print(s)
  print(1)
else:
  g=''
  for i in range(len(S)):
    g+=S[i]
  print(g)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(IN())
mod=1000000007

#+++++

def main():
	k = int(input())
	#b , c = tin()
	s = input()
	
	if k > len(s):
		print(s)
		return 
	ret = s[:k]+'...'
	print(ret)
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K=int(input())
S=list(input())
answer=[]
if len(S)>K:
  for i in range(K):
    answer.append(S[i])
  answer.append('...')
  s=''
  for i in range(len(answer)):
    s+=answer[i]
  print(s)
else:
    print(S)

Submission status: Wrong Answer

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

if i <= len(s):
    lh = len(s)-i
    for j in range(lh-1):
        print(s[j],end="")
    print("...")
else:
    for j in range(len(s)):
        print(s[j],end="")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
#import time
#import copy
#from collections import deque, Counter, defaultdict
#from fractions import gcd
#import bisect
#import itertools
input = sys.stdin.readline
#sys.setrecursionlimit(10**6)
 
def ri():
    return list(map(int, input().split()))
def rs():
    return list(input().strip())
 
k = int(input())
s = str(input())
if len(s)<=k:
    print(s)
else:
    print(s[:k]+"...")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

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

if i < len(s):
    lh = len(s)-i
    for j in range(lh-1):
        print(s[j],end="")
    print("...")
else:
    for j in range(len(s)):
        print(s[j],end="")

Submission status: Wrong Answer

Solution code:
K = 7
S = 'nikoandsolstice'
x = len(S)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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:
N = int(input())
S = input()

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
def main():
    N = int(input())
    l = input()
    ll = list(l)
    if len(l) <= N:
        print(l)
    else:
        kl = ''.join(ll[:N])
        print(kl+"...")
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
K = int(input())
S = input()
list_s =list(S)
T = len(list_s)
if T > K:
    for i in range(K,T):
        list_s[i] = '.'
    S =""
    for i in range(T):
        S += list_s[i]
print(S)

Submission status: Wrong Answer

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

if len(z) >= a: 
  print(z[0:a] + "...")
else:
  print(z)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# atcoder 
# Türkçe konuşyorum
# Türkler var mı
# memnün oldum

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


slen = len(S)
if(slen < K):
    print(S)
else: 
    pr = S[:K]
    change = S[K:]
    for i in range(len(change)):
        change = change.replace(change[i], ".")
    print(pr + change)

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

Submission status: Wrong Answer

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

print(z[0:a] + "...")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
#n = int(input())
#a,b = map(int,input().split())
#a_L = list(map(int,input().split()))
k = int(input())
s = list(input())
#print(len(s))
if len(s)+1 < k:
    print("".join(s))
else:
    t = "".join(s[:k]) + "..."
    print(t)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
K = int(input())
S = str(input().lower())
if len(S) <= K:
    print(S)
elif len(S) > K:
    stol = list(S)
    stol[K] = "..."
    print(stol)

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().lower())
if len(S) <= K:
    print(S)
elif len(S) > K:
    stol = list(S)
    stol[K-1] = "..."
    print(stol)

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())
#a,b = map(int,input().split())
#a_L = list(map(int,input().split()))
k = int(input())
s = list(input())
#print(len(s))
if len(s)+1 <= k:
    print("".join(s))
else:
    t = "".join(s[:k]) + "..."
    print(t)

Submission status: Wrong Answer

Solution code:

k = int(input())

s = input()

'''
k = 7
s = "nikoandsolstice"
'''
nagasa = len(s)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

else:
    print(s)

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

print(s)

Submission status: Wrong Answer

Solution code:
K = int(input())
S = list(input())
len_S = int(len(S))
S1 = ' '

if len_S <= K:
  print(K)
else:
  del S[K:]
  for x in S:
    S1 += x
  print(S1 + '...')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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