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 random
import math
LI = lambda: list(map(int,input().split()))
MI = lambda: map(int,input().split())
yes = lambda: print("Yes")
no = lambda: print("No")
I = lambda: list(input())
J = lambda x: "".join(x)
II = lambda: int(input())
SI = lambda: input()
#---khan17---template
k = II()
s = SI()
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)
    exit()

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

print("...")

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

Submission status: Accepted

Solution code:
gosu = int(input())
word = input()

if(len(word) > gosu):
  print(word[0:gosu] + '...')
else:
  print(word)

Submission status: Accepted

Solution code:
num = int(input())
input_str = input()

if num < len(input_str):
  ans_str = input_str[:num] + "..."
else:
  ans_str = input_str

print(ans_str)

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

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()
ans = ['']*(k+3)
if len(s)<=k:
    print(s)
else:
    for i in range(k):
        ans[i]=s[i]
    ans[k]='.'
    ans[k+1] = '.'
    ans[k+2] = '.'
    for i in range(k+2):
        print(ans[i],end='')
    print(ans[k+2])

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

S_len =len(S)
S_new = S[:K]+'...'

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

Submission status: Accepted

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

num = len(s)
if (num <= k):
    ans = s
else:
    id = k - 1
    tar = s[0:k]
    ans = tar + "..."
print(ans)

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def main():
    K, S = read().decode().split()
    K = int(K)
    if K < len(S):
        ans = S[:K] + '...'
    else:
        ans = S
    print(ans)
    return

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
K=input()
S=input()
K=int(K)
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)
else:
    for i in range(k):
        print(s[i],end="")
    print("...")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k=int(input())
s=input()
if len(s)>k:
  a=[s[i] for i in range(k)]
  a.append("...")
  print("".join(a))
else:
  print("".join(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()
list_s = list(s)
ans = ""

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

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

print(s)

Submission status: Accepted

Solution code:
k = int(input())
s = input()
if len(s) <= k:
    print(s)
elif len(s) > k:
    x = s[:k]
    dot = '...'
    ans = x + dot
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def main():
    K = int(input())
    S = input().rstrip()
    if len(S) <= K:
        print(S)
    else:
        newS = S[:K] + '...'
        print(newS)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

K = int(input())
word = input()
list_word = list(word)
if len(list_word) <= K:
    print(word)
else:
    for n in range(K):
        print(list_word[n], end="")
    print("...")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
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()

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    num =int(input())
    word = input()
    if len(word)<=num:
        print(word)
    else:
        string = ""
        for i in range(num):
            string+=word[i]
        string += "..."
        print(string)

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#import numpy as np

#T= str(input())
K = int(input())
#A,B,M= map(int,input().split())
#A = list(map(int,input().split()))
#B = list(map(int,input().split()))
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()
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:
  print(S[0:K]+"...")

Submission status: Accepted

Solution code:
"""
import random
import functools
import copy
import bisect
import array
import re
import collections
import heapq
import fractions
import itertools
import string
import math
from operator import itemgetter as ig
from bisect import bisect_left, bisect_right, insort_left, insort_right
from itertools import permutations, combinations, product, accumulate, groupby
from heapq import heappush, heappop
from collections import deque, defaultdict, Counter
import sys
sys.setrecursionlimit(10 ** 7)
# import numpy as np

inf = 10 ** 20
INF = float("INF")
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]
ddn9 = ddn + [(0, 0)]
'''for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:'''
"""

from collections import deque, defaultdict
import sys
sys.setrecursionlimit(10 ** 7)


def wi(): return list(map(int, sys.stdin.readline().split()))
# WideIntPoint


def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]


def ws(): return sys.stdin.readline().split()


def si(): return int(sys.stdin.readline())  # SingleInt


def ss(): return input()


def hi(n): return [si() for _ in range(n)]


def hs(n): return [ss() for _ in range(n)]  # HeightString


def s_list(): return list(input())


def mi(n): return [wi() for _ in range(n)]  # MatrixInt


def mip(n): return [wip() for _ in range(n)]


def ms(n): return [ws() for _ in range(n)]


def num_grid(n): return [[int(i) for i in sys.stdin.readline().split()[
    0]] for _ in range(n)]  # NumberGrid


def grid(n): return [s_list() for _ in range(n)]


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def round_up(a, b):
    """ a/b の切り上げ """
    c = (a + b - 1) / b
    return c


def lcm(a, b):
    """a,bの最小公倍数"""
    return a * b // gcd(a, b)


def floor(a, b):
    """floor(a/b) 整数値を返す"""
    c = (a - a % b)/b
    return int(c)


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

Submission status: Accepted

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

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

print("{}".format(ret))

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

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

Submission status: Accepted

Solution code:
import itertools
import math
import fractions
import functools
import copy

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

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

Submission status: Accepted

Solution code:

import sys

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

if len(S)<=K:
    print(S)
    sys.exit()

S_list=[]

for i in range(K):
    S_list.append(S[i])
S_list.append("...")

print(''.join(S_list))

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
#coding:utf-8

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

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

Submission status: Accepted

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


def solve(k, s):
    if len(s) > k:
        return s[0:k] + "..."
    return s


def main():
    k, s = input_from_console()
    print(solve(k, s))


if __name__ == "__main__":
    import sys

    if sys.gettrace():  # Check if the python interpreter is in debug mode or not.
        check_cases()
    else:
        main()

Submission status: Accepted

Solution code:
length=eval(input(""))
string = input("")

if(len(string)<=length):
    print(string)
if(len(string)>length):
    print(string[0:length],end="...")

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

if K < len(S):
    S = S[:K] 
    S.append("...")

print("".join(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:
if __name__ == "__main__":
    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()
ln = len(S)

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

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

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:
    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[: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:
def main():
    k = int(input())
    s = input()
    if len(s) > k:
        print('%s...' % 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],end='');
    print('...');

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

#k = 7
#s = 'nikoandsolstice'

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

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

sys.setrecursionlimit(1000000)
ACMOD = 1000000007
INF = 1 << 62



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


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


solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
S = input()
l = len(S)
asn = ''

if l <= k:
  ans = S
else:
  ans = S[:k] + '...'
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
numTest = int(input())

inputLine = input()

print(inputLine[0 : numTest] + '...' if len(inputLine) > numTest else inputLine)

Submission status: Accepted

Solution code:
K=int(input()) # 表示する文字数
S=input() # 文字列

print(S[:K]+int(len(S)>K)*"...")

Submission status: Accepted

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

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 K < len(S):
    print(f'{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+'...')

Submission status: Accepted

Solution code:

def main():
    K=int(input())
    S=input()
    
    if len(S)<=K:
        print(S)
    else:
        print(S[:K],"...", sep='')


main()

Submission status: Accepted

Solution code:
K=int(input())
S=input()
a=len(S)
if a<=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:
import sys
import itertools
import numpy as np
from collections import Counter

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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


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

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:
#import math
#=input()
k=int(input())
s=input()
#=map(int,input().split())
#=list(map(int,input().split()))
#=[list(map(int,input().split())) for _ in range()]

if len(s) <= k:
    print(s)
else:
    s = s[:k]
    s += '...'
    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())
l = list(input())
if len(l) <= n:
    print("".join(l))
elif len(l) > n:
    del l[n:]
    print("".join(l) + "...")

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

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

Submission status: Accepted

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

import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        # for line in sys.stdin:
        #     lines.append(line)
        lines.append(input())
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

   
    (k, ) = [int(e) for e in lines[0].split(' ')]
    s = lines[1]

    return (k, s)


def solve(k, s):

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

    


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#from pprint import pprint
#from collections import deque
#from collections import defaultdict
#from collections import Counter
#from copy import deepcopy
#from itertools
#import sys 
#sys.setrecursionlimit(N) #N回まで再起を許可する。

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

# = list(map(int,input().split()))

# = [list(map(int,input().split())) for _ in range(XXXX)]

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
s=list(str(input()))
l=[]
if(n>=len(s)):
    print("".join(s))
elif(n!=len(s)):
    for i in range(n):
        l.append(s[i])
    for i in range(3):
        l.append(".")
    print("".join(l))

Submission status: Accepted

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

if len(s) > k:
    for i in range(k):
        print(s[i], 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:
x = int(input())
y = list(input())

if len(y) <= x:
  print(''.join(y))
else:
  print(''.join(y[:x]) + '...')

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    resolve()

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

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
from math import floor,ceil,sqrt,factorial,log
from heapq import heapify, heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from decimal import Decimal
inf = float('inf')
mod = 1000000007

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
	length = int(input().strip())
	string = input().strip()
	if len(string) <= length:
		print(string)
	elif len(string) > length:
		print(string[:length], end = '')
		print("...")

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 標準入力の取得
K = int(input())
S = input()

# 求解処理
result = str()
if len(S) <= K:
    result = S
else:
    result = S[:K] + "..."

# 結果出力
print(result)

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:

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


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

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

Submission status: Accepted

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

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

print(result)

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

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

for i in ans:
    print(i, end='')
print()