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

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

A.append('...')
print(''.join(A))

Submission status: Accepted

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

p=[]

for a in s:
    p.append(a)

if len(p)<=k:
    print(s)
else:
    q=''
    for a in range(k):
        q=q+p[a]
    
    q=q+'...'

    print(q)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#2問目
K = int(input())
S = input()
mojiretsu = ""
if(len(S) > K):
    for i in range(K):
        mojiretsu += S[i]
    print(mojiretsu + "...")
else:
    print(S)

Submission status: Accepted

Solution code:
def readinput():
    k=int(input())
    s=input()
    return k,s

def main(k,s):
    if(len(s)<=k):
        return s
    else:
        return s[0:k]+'...'

if __name__=='__main__':
    k,s=readinput()
    ans=main(k,s)
    print(ans)

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 = str(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
l=int(input())
a=input()
b=list(a)

x=len(b)
if x <= l:
    print(a)
else:
    a=b[0:l]
    str_a="".join(a)
    print(str_a+'...')

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:

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    K=I()
    S=input()
    
    if len(S)<=K:
        print(S)
    else:
        print(S[:K]+"...")

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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


ans=''


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:
  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[:K] + "...")

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:
import sys
def I(): return int(sys.stdin.readline().rstrip())
def S(): return sys.stdin.readline().rstrip()

k = I()
s = S()

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import sys
readline = sys.stdin.readline
read = sys.stdin.read


#n,m,*ab = [int(i) for i in read().split()]

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

Submission status: Accepted

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


if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
import math
import string
import collections
from collections import Counter


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


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
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()
count = 0
for s in S:
    if count == K:
        print('...')
        break
    print(s,end='')
    count += 1

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import numpy as np
import math
from collections import deque 
from functools import reduce

# input = sys.stdin.readline

k = int(input())

s = input()

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

Submission status: Accepted

Solution code:
ls = []
for i in range(2):
    ls.append(input())
if len(ls[1]) > int(ls[0]):
    ans = ls[1][0:int(ls[0])]
    ans = ans + '...'
    print(ans)
else:
    print(ls[1])

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolver():
    pass


def main():
    K = int(input())
    S = input()
    
    if len(S) <= K:
        print(S)
    else:
        print(f"{S[:K]}...")


    resolver()


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
s = 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:
  s = s[:k] + "..."
  print(s)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

result = ""

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

Submission status: Accepted

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

if len(s) <= k:
  print(''.join(s))

else:
  del s[k:]
  s.append('...')
  print(''.join(s))

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

Submission status: Accepted

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

print(s)

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:

#N,K=map(int,input().split())
K=int(input())

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

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(S[:K]+'...')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
N = int(sys.stdin.readline().rstrip())
S = sys.stdin.readline().rstrip()

if S == S[:N]:
    print(S[:N])
else:
    print(S[:N] + '...')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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(''.join(list(S)[: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:
# -*- coding: utf-8 -*-
K = int(input())
S = str(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
def input(): return sys.stdin.readline().rstrip()

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

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

if __name__ == '__main__':
  main()

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

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

n=len(s)

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

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:
def main():
    k = int(input())
    s = input()

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

if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
k = int(input())
s = input()
ans = ''
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):
    print(s)
else:
    res = s[0:k] + "..."
    print(res)

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:
    S = S[:K] + '...'

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:
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:
    print("".join(list(S)[:K]) + "...")

Submission status: Accepted

Solution code:
# Kの入力
K = int(input())
# Sの入力
S = input()

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

Submission status: Accepted

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

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

# print(K, S)

if len(S) <= K:
  print(S)
elif len(S) > K:
  print("{}...".format(S[:K]))

Submission status: Accepted

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]


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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K = int(input())
S = list(input())
ans = ['...']

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

Submission status: Accepted

Solution code:
#from collections import deque,defaultdict
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True # and False
BIG = 10**18
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

k = inn()
s = ins()
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:
    print(S[:K]+"...")

Submission status: Accepted

Solution code:
k=int(input())
s=input()
c=len(s)
a=list(s)
List=[]


if c<=k:
    print(s)
else:
    for i in range(k):
        List.append(a[i])
    List.append('...')
    print(*List,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:
n=int(input())
word=input().rstrip()
if len(word)<=n:
    print(word)
else:
    print(word[:n]+"...")

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:
    ans=s
else:
    ans=s[0:k]+"..."
print(ans)

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:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

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

if len(S) <= K:
    print (S)
else:
    print (S[: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()

L=len(S)
if L <=K:
    print(S)
else :
    ans=S[0:K]
    print("%s..."% ans)

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

def calculate(k,s):
    ss = list(S)

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

calculate(K,S)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k=int(input())
s=input()
plus="..."

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

Submission status: Accepted

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

lenS = len(S)

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

Submission status: Accepted

Solution code:
K, S = [input() for i in range(2)]

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K=int(input())
S=str(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[0:K] + "...")

Submission status: Accepted

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


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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

l_s = len(s)

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

Submission status: Accepted

Solution code:
def main():
    import sys
    def input():
        return sys.stdin.readline()[:-1]
    K=int(input())
    S=input()
    N=len(S)
    if K>=N:
        print(S)
    else:
        print(S[:K]+"...")

    

        


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
k=int(input())
s=input()
len_s=len(s)
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:
    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:
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()
ans =[]
for i,x in enumerate(S):
    if i >= K:
        ans.append("...")
        break
    ans.append(x)
ans = "".join(ans)
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
from math import log2,floor,ceil,sqrt
# import bisect
# from collections import deque

Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()
 
def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
INF = 10 ** 18
MOD = 10**9+7

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

Submission status: Accepted

Solution code:
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import math
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

K = INT()
S = input()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    K = int(input())
    S = input()

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


main()

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

Submission status: Accepted

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

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

print(ans)

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


def get_result(data):
    K = int(data[0][0])
    S = data[1][0]
    return S if len(S) <= K else S[:K] + "..."


if __name__ == '__main__':
    raw_data = [val.rstrip() for val in stdin.readlines()]
    data = [list(map(str, val.split(' '))) for val in raw_data]
    result = get_result(data)
    print(result)

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
k=input()
s=raw_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:
    print(s)
else:
    print(s[: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)
else:
	print(s[:k]+"...")

Submission status: Accepted

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

Submission status: Accepted

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

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from sys import stdin
import math
import fractions
from collections import deque
from collections import Counter
import itertools

readline = stdin.buffer.readline

INF = 10 ** 10

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

if len(S) <= K:
    print(S)
else:
    tmp = "".join([c for c in S[:K]])
    print(tmp + "...")

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 = str(input())

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

Submission status: Accepted

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

Submission status: Accepted

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