Buggy python submission (verdict: Runtime Error):
s=input()
k=int(input())
a=[]
a = [s[i:j] for i in range(0,len(s)) for j in range(1,len(s)+1) if i != j]
a = set(a)
a.remove("")
a=sorted(a)
print(a[k-1])


Fixed submission:
s=input()
k=int(input())
a=[s[i:i+j+1] for i in range(len(s)) for j in range(k+1)]
a=set(a)
a=sorted(a)
print(a[k-1])

Buggy python submission (verdict: Runtime Error):
s=input()
k=int(input())
a=[]
for i in range(0,len(s)):
    for j in range(1,len(s)+1):
        a.append(s[i:j])
num = a.count("")
for i in range(num):
    a.remove("")
a=set(a)
a=sorted(a)

print(a[k-1])

Fixed submission:
s=input()
k=int(input())
a=[s[i:i+j+1] for i in range(len(s)) for j in range(k+1)]
a=set(a)
a=sorted(a)
print(a[k-1])

Buggy python submission (verdict: Runtime Error):
s=input()
k=int(input())
a=[]
a = [s[i:j] for i in range(0,len(s)) for j in range(1,len(s)+1) if i != j]
a=set(a)
a.remove("")
a=sorted(a)
print(a[k-1])


Fixed submission:
s=input()
k=int(input())
a=[s[i:i+j+1] for i in range(len(s)) for j in range(k+1)]
a=set(a)
a=sorted(a)
print(a[k-1])

Buggy python submission (verdict: Runtime Error):
s=input()
k=int(input())
a=[]
for i in range(0,len(s)):
    for j in range(1,len(s)+1):
        if i != j and s[i:j] not in a:
            a.append(s[i:j])
a.remove("")
a=sorted(a)
print(b[k-1])


Fixed submission:
s=input()
k=int(input())
a=[s[i:i+j+1] for i in range(len(s)) for j in range(k+1)]
a=set(a)
a=sorted(a)
print(a[k-1])

Buggy python submission (verdict: Runtime Error):
s=input()
k=int(input())
a=[]
a = [s[i:j] for i in range(0,len(s)) for j in range(1,len(s)+1) if i != j]
a.remove("")
a=sorted(a)
b=[]
for i in a:
    if i not in b:
        b.append(i)
print(b[k-1])


Fixed submission:
s=input()
k=int(input())
a=[s[i:i+j+1] for i in range(len(s)) for j in range(k+1)]
a=set(a)
a=sorted(a)
print(a[k-1])

Buggy python submission (verdict: Time Limit Exceeded):
s=input()
k=int(input())
a=[]
for i in range(0,len(s)):
    for j in range(1,len(s)+1):
        a.append(s[i:j])
num = a.count("")
for i in range(num):
    a.remove("")
a=sorted(a)
b=[]
for i in a:
    if i not in b:
        b.append(i)
print(b[k-1])



Fixed submission:
s=input()
k=int(input())
a=[s[i:i+j+1] for i in range(len(s)) for j in range(k+1)]
a=set(a)
a=sorted(a)
print(a[k-1])

Buggy python submission (verdict: Runtime Error):
s=input()
k=int(input())
a=[]
a = [s[i:j] for i in range(0,len(s)) for j in range(1,len(s)+1) if i != j]
b=[]
for i in a:
    if i not in b:
        b.append(i)
b.remove("")
b=sorted(b)
print(b[k-1])


Fixed submission:
s=input()
k=int(input())
a=[s[i:i+j+1] for i in range(len(s)) for j in range(k+1)]
a=set(a)
a=sorted(a)
print(a[k-1])

Buggy python submission (verdict: Runtime Error):
s=input()
k=int(input())
a=[]
for i in range(0,len(s)):
    for j in range(1,len(s)+1):
        if i != j:
            if s[i:j] not in a:
                a.append(s[i:j])
a.remove("")
a=sorted(a)
print(a[k-1])


Fixed submission:
s=input()
k=int(input())
a=[s[i:i+j+1] for i in range(len(s)) for j in range(k+1)]
a=set(a)
a=sorted(a)
print(a[k-1])

Buggy python submission (verdict: Runtime Error):
s=input()
k=int(input())
a=[]
for i in range(0,len(s)):
    for j in range(1,len(s)+1):
        if i != j:
            a.append(s[i:j])
a.remove("")
a=sorted(a)
b=[]
for i in a:
    if i not in b:
        b.append(i)
print(b[k-1])


Fixed submission:
s=input()
k=int(input())
a=[s[i:i+j+1] for i in range(len(s)) for j in range(k+1)]
a=set(a)
a=sorted(a)
print(a[k-1])

Buggy python submission (verdict: Runtime Error):
s=input()
k=int(input())
a=[]
for i in range(0,len(s)):
    for j in range(1,len(s)+1):
        a.append(s[i:j])
a=sorted(a)
b=[]
for i in a:
    if i not in b:
        b.append(i)
b.remove("")
print(b[k-1])


Fixed submission:
s=input()
k=int(input())
a=[s[i:i+j+1] for i in range(len(s)) for j in range(k+1)]
a=set(a)
a=sorted(a)
print(a[k-1])

Buggy python submission (verdict: Time Limit Exceeded):
s=input()
k=int(input())
a=[]
for i in range(0,len(s)):
    for j in range(1,len(s)+1):
        a.append(s[i:j])
num = a.count("")
for i in range(num):
    a.remove("")
a=sorted(a)
b=[]
for i in a:
    if i not in b:
        b.append(i)
print(b[k-1])


Fixed submission:
s=input()
k=int(input())
a=[s[i:i+j+1] for i in range(len(s)) for j in range(k+1)]
a=set(a)
a=sorted(a)
print(a[k-1])