Buggy python submission (verdict: Time Limit Exceeded):
s = input()
k = int(input())

kn = len(s) * k
k_list = set(s)
for i in range(2, len(s)+1):
    if len(k_list) >= kn:
        break
    for j in range(len(s)+1-i):
        sub = s[j:j+i]
        k_list.add(sub)

k_list = list(k_list)
k_list.sort()
print(k_list[k-1])

Fixed submission:
s = input()
k = int(input())

kn = len(s) * k
k_list = set(s)

for i in range(2, k+1):
    for j in range(len(s)):
        k_list.add(s[j:j+i])

k_list = list(k_list)
k_list.sort()
print(k_list[k-1])

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
k = int(input())

k_list = set(s)
for i in range(2, len(s)+1):
    for j in range(len(s)+1-i):
        sub = s[j:j+i]
        k_list.add(sub)
        if len(k_list) > k * len(s):
            break
    if len(k_list) > k * len(s):
        break

k_list = list(k_list)
k_list.sort()
print(k_list[k-1])

Fixed submission:
s = input()
k = int(input())

kn = len(s) * k
k_list = set(s)

for i in range(2, k+1):
    for j in range(len(s)):
        k_list.add(s[j:j+i])

k_list = list(k_list)
k_list.sort()
print(k_list[k-1])

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
k = int(input())

k_list = set(s) 
for i in range(2, len(s)+1):
    for j in range(len(s)+1-i):
        sub = s[j:j+i]
        k_list.add(sub)
    if len(k_list) > k * len(s):
        break

k_list = list(k_list)
k_list.sort()
print(k_list[k-1])

Fixed submission:
s = input()
k = int(input())

kn = len(s) * k
k_list = set(s)

for i in range(2, k+1):
    for j in range(len(s)):
        k_list.add(s[j:j+i])

k_list = list(k_list)
k_list.sort()
print(k_list[k-1])

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
k = int(input())

k_list = set(s) 
for i in range(2, len(s)+1):
    for j in range(len(s)+1-i):
        sub = s[j:j+i]
        k_list.add(sub)
    if len(k_list) > k * len(s):
        break

k_list = list(k_list)
k_list.sort()
print(k_list[k-1])

Fixed submission:
s = input()
k = int(input())

kn = len(s) * k
k_list = set(s)

for i in range(2, k+1):
    for j in range(len(s)):
        k_list.add(s[j:j+i])

k_list = list(k_list)
k_list.sort()
print(k_list[k-1])

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
k = int(input())

k_list = set(s) 
for i in range(2, len(s)+1):
    for j in range(len(s)+1-i):
        sub = s[j:j+i]
        k_list.add(sub)

k_list = list(k_list)
k_list.sort()
print(k_list[k-1])

Fixed submission:
s = input()
k = int(input())

kn = len(s) * k
k_list = set(s)

for i in range(2, k+1):
    for j in range(len(s)):
        k_list.add(s[j:j+i])

k_list = list(k_list)
k_list.sort()
print(k_list[k-1])

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
k = int(input())

k_list = set() 
for i in range(1, len(s)+1):
    for j in range(len(s)+1-i):
        sub = s[j:j+i]
        k_list.add(sub)
k_list = list(k_list)
k_list.sort()
print(k_list[k-1])

Fixed submission:
s = input()
k = int(input())

kn = len(s) * k
k_list = set(s)

for i in range(2, k+1):
    for j in range(len(s)):
        k_list.add(s[j:j+i])

k_list = list(k_list)
k_list.sort()
print(k_list[k-1])

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
k = int(input())

k_list = [] 
for i in range(1, len(s)+1):
    for j in range(len(s)+1-i):
        sub = s[j:j+i]
        if sub not in k_list:
            k_list.append(sub)
k_list.sort()
print(k_list[k-1])

Fixed submission:
s = input()
k = int(input())

kn = len(s) * k
k_list = set(s)

for i in range(2, k+1):
    for j in range(len(s)):
        k_list.add(s[j:j+i])

k_list = list(k_list)
k_list.sort()
print(k_list[k-1])

Buggy python submission (verdict: Runtime Error):
s = input()
k = int(input())

k_list = [] 
for i in range(1, len(s)+1):
    for j in range(len(s)+1-i):
        sub = s[j:j+i]
        if sub not in k_list:
            k_list.append(sub)
a.sort()
print(a[k-1])

Fixed submission:
s = input()
k = int(input())

kn = len(s) * k
k_list = set(s)

for i in range(2, k+1):
    for j in range(len(s)):
        k_list.add(s[j:j+i])

k_list = list(k_list)
k_list.sort()
print(k_list[k-1])