Problem:


Score: 200 points

Problem Statement

We have a string S consisting of lowercase English letters.

If the length of S is at most K, print S without change.

If the length of S exceeds K, extract the first K characters in S, append ... to the end of them, and print the result.

Constraints

K is an integer between 1 and 100 (inclusive).

S is a string consisting of lowercase English letters.

The length of S is between 1 and 100 (inclusive).

Input

Input is given from Standard Input in the following format:

K
S

Output

Print a string as stated in Problem Statement.

Sample Input 1

7
nikoandsolstice

Sample Output 1

nikoand...

nikoandsolstice has a length of 15, which exceeds K=7.

We should extract the first 7 characters in this string, append ... to the end of them, and print the result nikoand....

Sample Input 2

40
ferelibenterhominesidquodvoluntcredunt

Sample Output 2

ferelibenterhominesidquodvoluntcredunt

The famous quote from Gaius Julius Caesar.



Sample input:
7
nikoandsolstice


Sample output:
nikoand...

Submission status: Accepted

Solution code:
import sys

def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))
def RN(N): return [input().strip() for i in range(N)]


def main():
    K = II()
    S = input()
    Sl = len(S)
    if Sl <= K:
        print(S)
    else:
        ans = S[:K] + "..."
        print(ans)



if __name__ == "__main__":
	main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
K = int(input())
S = input()

#print( S[:K] )

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

K = int(input().rstrip())
S = input().rstrip()

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

Submission status: Accepted

Solution code:
k = int(input())
n = input()
 
if len(n)<=k:
  print(n)
else:
  print(n[: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:
import sys
import math
k=int(input())
s=input()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if i<k+1:
	print(s)
else:
	print(s[0:k]+'...')

Submission status: Accepted

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

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

else:
    s = s[:n] + "..."
    print(s)

Submission status: Accepted

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

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

print(s)

Submission status: Accepted

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

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

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

Submission status: Accepted

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



if len(S)<=K:
  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(str(S[0:K]) + '...')

Submission status: Accepted

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

Submission status: Accepted

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

if l<= k:
    print(S)
if l>k:
    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()
ls = len(s)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

length = len(S)
if length <= K:
    print(S)
else:
    s = S[0:K]
    print('{}...'.format(s))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
#!/usr/bin/env python3

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K=input()
S=input()
S=str(S)
C=len(S)

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

Submission status: Accepted

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

len_s = len(S)

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

Submission status: Accepted

Solution code:


k = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    tmp = s[0: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()
s_l=list(s)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K=int(input())
N=input()
n=list(N)
if len(n)<=K:
  print(N)
else:
  ans=''.join(n[0:K])
  l=[ans,'...']
  Ans=''.join(l)
  print(Ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# print(len(s))

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:
    for i in range(k):
        print(s[i], end='')
    print('...')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- 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 = input()

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

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:
    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()
len_s = len(s)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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 = list(input())
if len(s) <= k:
    print("".join(s))
else:
    s = s[:k]
    s.append("...")
    print("".join(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:
from sys import stdin, exit

if __name__ == '__main__':
    k = int(input())
    s = input()
    print(s[0:k], end="")
    if (k<len(s)):
        print("...")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# 初期入力
import sys
input = sys.stdin.readline
K = int(input())
S =input().strip()
l =len(S)
if 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:
  retu=S[:K]+"..."
  print(retu)

Submission status: Accepted

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

S_count = len(S)

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

Submission status: Accepted

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

test(int(input()), input())

Submission status: Accepted

Solution code:
K=int(input())
S=input()
LEN=len(S)
if LEN<=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 = input()

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

Submission status: Accepted

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def Int():
    return int(input())
def Ints():
    return map(int,input().split())
def IntList():
    return list(Ints())
def IntMat(N):
    return [IntList() for i in range(N)]

import sys
sys.setrecursionlimit(4100000)
rl = sys.stdin.readline

K = Int()
S = input()

if len(S) <= K:
    print(S)
else:
    ans = ''
    c = 0
    for i in S:
        if c < K:
            ans += i
        else:
            break
        c += 1
    print(ans+'...')

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	B
# CreatedDate:  2020-05-17 21:05:31 +0900
# LastModified: 2020-05-17 21:12:00 +0900
#


import os
import sys
#import numpy as np
#import pandas as pd


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

if __name__ == "__main__":
    main()

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()
slen = len(S)

if slen <= 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:
    for i in range(k):
        print(s[i],end='')
    print('...')

Submission status: Accepted

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

Submission status: Accepted

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

len_s = len(S)

if len_s > K:
    S = S[0:K] + '...'

print(S)

Submission status: Accepted

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

Submission status: Accepted

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

#k=7
#s='nikoandsolstice'

if len(s)>k:
    print(s[0:k],'...',sep='')

else:
    print(s)

Submission status: Accepted

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

Submission status: Accepted

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

#print(N)
#print(S)

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

Submission status: Accepted

Solution code:
k = int(input())
s = list(input())
if len(s) > k:
    for i in range(len(s) - k):
        s.pop()
    ss = "".join(s)
    ss += "..."
    print(ss)
else:
    print("".join(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())

s = input()

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

Submission status: Accepted

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

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

elif(k < len(s)):
    s_list=list(s)
    out=s[:k]
    
    for c in out:
        print(c, end='')

    print('...', end='')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
    for i in range(k):
        print(s[i],end="")
    print("...", end="")
else:
    for i in range(len(s)):
        print(s[i],end="")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
s = input()
n = len(s)
if n>k:
    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:
# -*- coding: utf-8 -*-
"""
Created on Sun May 17 20:57:44 2020

@author: Kei
"""


K = input()
K = int(K)

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 k+1 > len(s):
  print(s)
else:
  print('{st}...'.format(st=s[0:k]))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy,math

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

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

Submission status: Accepted

Solution code:
def solve():
    K = int(input())
    S = input()
    length_S = len(S)
    if length_S <= K:
        print('{}'.format(S))
    else:

        a = S[0:K]
        a += '...'
        print('{}'.format(a))



if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if len(S) <= K:
    print(S)
else:
    ans = str(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:
def main():
  K = int(input())
  S = input()

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

  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],"...",sep="")

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

l = len(S)

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

Submission status: Accepted

Solution code:
K = int(input())
S = input()
tripledot = '...'
if len(S) > K:
    print(S[0:K] + tripledot)
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 = str(input())
len_s = len(s)
 
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 = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
s = input()
s_list = list(s)#文字列をリストに
long = len(s_list)

if(long <= k):
    print(s)
else:
    print(''.join(s_list[:k])+'...')

Submission status: Accepted

Solution code:
datanum = int(input())
mojiretu = input()

if len(mojiretu) <= datanum:
  print(mojiretu)
  
else:
  print(mojiretu[:datanum] + "...")

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3.7
# -*- coding: utf-8 -*-

#ABC168B

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

Submission status: Accepted

Solution code:
number = int(input())
word =input()
word_list = list(word)
word_number = len(word_list)
cnt = 0
empty_word = ""
if word_number <= number:
    print(word)
else :
    while cnt <= number - 1 :
        empty_word += word_list[cnt]

        cnt += 1

    empty_word += "..."
    print(empty_word)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k = int(input())
s = input()
print(s if len(s) <= k else "{}...".format(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:
print((lambda k, s: s if len(s) <= k else s[:k] + '...')(int(input()), input()))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

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

  print(s)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k=int(input())
s=input()
if len(s)<=k :
    print(s)
if len(s)>k :
    for i in range (0,k) :
        print(s[i],end='')
    print("...")

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


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


def main():
    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
    solve(K, S)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X=int(input())
Y=list(input())
if X >= len(Y):
    print(''.join(Y[0:X]))
else:
    print(''.join(Y[0:X])+'...')

Submission status: Accepted

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

if len(b) <= a:
    ans = b
else:
    ans = b[0:a] + "..."

print(ans)

Submission status: Accepted

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

    print(s)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
K=input()
S=raw_input()
len_S=len(S)
if K<len_S:
    print S[:K]+"..."
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()
List = list(S)
l = len(List)

if l <= K:
  print(S)
else:
  a = List[0:K]
  print(''.join(a) + "...")

Submission status: Accepted

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

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, M = map(int, input().split())
#A = list(map(int, input().split()))
K = int(input())
S = str(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())

S = input()

if len(S) > K:
  print ('{t}...'.format(t=S[0:K]))
else:
  print (S)

Submission status: Accepted

Solution code:
K = int(input())
S = input()
a = "..."

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

Submission status: Accepted

Solution code:
k=int(input())
s=input()
l=len(s)
ans=""
if k >= l:
    ans=s
else:
    for i in range(k):
        ans += s[i]
    ans+="..."
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# coding: utf-8
def main():
    K = int(input())
    S = input()
    if len(S) <= K:
        print(S)
    else:
        print(S[:K] + '...')

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
K, S = [int(input()), 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:
    s = S[0:K] + '...'
    print(s)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
"""AtCoder Beginner Contest 168: B - 
https://atcoder.jp/contests/abc168/tasks/abc168_b
"""

__author__ = 'bugttle <bugttle@gmail.com>'


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

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

if __name__ == '__main__':
    main()

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)
else:
    print("{}...".format(s[:k]))

Submission status: Accepted

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

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