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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#B
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 = 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 = input()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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()
o = S if len(S) <= K else S[:K]+'...'
#このスライス忘れたらあかんよーーーー
print(o)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import collections
K = int(input())
S = input()
L = list(S)
if len(L) <= K:
  print(S)
else:
  M = L[:K]
  print(''.join(M)+'...')

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

if c <= a:
    print(b)
else: 
    print(b[:a] + "...")

Submission status: Accepted

Solution code:
a = int(input())
b = list(input())
d = list(b[0])
if a < len(b):
    for c in range(a-1):
        d.append(b[c+1])
    d.append("...")
    d = "".join(d)
    print(d)
else:
    b = "".join(b)
    print(b)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

S_len = len(S)
ans = ""

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

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

le = len(S)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
x = len(s)
if (x <= n):
  print(s)
else:
  for i in range (n):
    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 = input()
 
if len(s) <= k :
  print(s)
else:
  print(s[0:k]+"...")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
print(f'{S if len(S)<=N else S[:N] + "..."}')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
#ABC168-B
k=int(input())
s=str(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:
  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(s)
else:
  print(s[0: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:
def solve():
    K = int(input())
    S = input()
    if len(S) > K:
        print("{}...".format(S[:K]))
    else:
        print(S)

if __name__ == "__main__":
    solve()

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

    output = ''
    if len(s) > k:
        for i in range(k):
            output += s[i]
        output += '...'
    else:
        output = s

    print(output)


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

Submission status: Accepted

Solution code:
# Triple Dots
K = int(input())
S = input()
ans = S[:K] + ['...', ''][len(S) <= K]
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

if len(S) <= K:
    print("".join(S))
else:
    tmp = [S[i] for i in range(K)]
    print("".join(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 = int(input())
s = input()
if len(s) <= k:
    print(s)
else:
    print(s[:k] + "...")

Submission status: Accepted

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

def main():
    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()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(k, s):
    if len(s) <= k:
        print(s)
    else:
        print(s[:k] + "...")


if __name__ == "__main__":
    k = int(input())
    s = input()
    main(k, s)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    k = int(input())
    s = input()
    if len(s) <= k:
        print(s)
        return
    else:
        r = ""
        for rr in range(k):
            r += s[rr]
        r += "..."
        print(r)
        return 

main()

Submission status: Accepted

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

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

ans = S

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

print(ans)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    k = int(input())
    s = list(input())

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

Submission status: Accepted

Solution code:
input_int = input()
input_str = input()

K = int(input_int)
S = str(input_str)

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc168/tasks/abc168_b

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

Submission status: Accepted

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

s = len(S)

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

Submission status: Accepted

Solution code:
def main():
    # ab = [int(_x) for _x in input().split()]
    K = int(input())
    S = input().strip()
    if (len(S) > K):
        print(S[:K] + "...")
    else:
        print(S)


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def tripleDots(n, string):
	string_len = len(string)
	if string_len > n : 
		string = string[ 0 : n ] + "..."
	print(string)

arr = ["", ""]

for i in range(2):
	arr[i] = input()


tripleDots(int(arr[0]), arr[1])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K=int(input())
d=list(map(str,input().split()))
D=[]
for i in range(len(d[0])):
    D.append(d[0][i])
if len(D)<=K:
    print(''.join(D))
else:
    print(d[0][0:K]+'...')

Submission status: Accepted

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

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

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


if __name__ == '__main__':
    Qb()

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:

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

Submission status: Accepted

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

if length > 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:
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    k = int(input())
    s = input()
    if len(s) <= k:
        print(s)
    else:
        print(s[:k]+'...')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
S = input()
sentence=""
if len(S) <= K:
  print(S)
  exit(0)
if K < len(S):
  for i in range(K):
     sentence = sentence + S[i]
print(sentence + "...")

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

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

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

Submission status: Accepted

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

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:
# ABC168
# B (Triple Dots)
K = int(input())
S = input()
a = len(S)
if a <= K:
    print(S)
else:
    print(str(S[0:K])+'...')

Submission status: Accepted

Solution code:
k=int(input())
str=input()
char_list = list(str)

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

Submission status: Accepted

Solution code:
k = int(input())
s = input()
lists = list(s)
news = list()
if len(lists) <= k:
    print(s)
else:
    for i in range(k):
        news.append(lists[i])
    result = "".join(news)
    print(result + "...")

Submission status: 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:
N=int(input())
S = list(input())
num=len(S)
if num<=N:
    print(*S,sep='')
else:
    for i in range(N):
          print(S[i], end='')
    print("...")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
S = input()
i = 0
string = ""
if len(S) > K:
    while i < K:
        string += S[i]
        i += 1
    print(string + "...")
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())
str = list(input())
 
if len(str) <= K:
  print("".join(str))
else:
  print("".join(str[0: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:
k = int(input())
s =str(input())
s_print = ''

if k >= len(s):
    print(s)
    exit()
else:
    for i in range(k):
        s_print += s[i]
    s_print += '...'
print(s_print)

Submission status: Accepted

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

    input = sys.stdin.readline

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
k, s = open(0).read().split()
K = int(k)

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

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= list(str(input()))
list=[]
if(len(S)>K):
    for I in range(0,K):
        list.append(S[I])
        b="".join(list)
    print(b+"...")
else:
    x="".join(S)
    print(x)

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:
k = int(raw_input())
s = raw_input()
l = len(s)
if k >= l:
    print(s)
else:
    ans = ""
    i = 0
    while i < k:
        ans += s[i]
        i += 1
    ans += "..."
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ln = int(input())
word = input()
if ln >= len(word):
    print(word)
else:
    print(word[:ln],end=(''))
    print("...")

Submission status: Accepted

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

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

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 s[:k:]+'...')

Submission status: Accepted

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

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

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

Submission status: Accepted

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



if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    T = []
    for i in range(K):
        T.append(S[i])
    print(''.join(T) + '...')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#In[]:
k = int(input())
s = input()

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

Submission status: Accepted

Solution code:
"""AtCoder."""

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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