Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
import collections
r = [0]*100000
n,k = [int(x) for x in sys.stdin.readline().split()]
for i in range(n):
	a, b = [int(x) for x in sys.stdin.readline().split()]
	r[a] += b
c = 0
for i,j in enumerate(r):
	c += j
	if c >= k:
		print(i)
		break

Fixed submission:
import sys
import numpy as np
import collections
n,k = [int(x) for x in sys.stdin.readline().split()]
r = collections.defaultdict(int)
for i in range(n):
	a, b = [int(x) for x in sys.stdin.readline().split()]
	r[a] += b
d = sorted(r.items())
c = 0
for i,j in enumerate(d):
	c += j[1]
	if c >= k:
		print(int(j[0]))
		break

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
import collections
n,k = [int(x) for x in sys.stdin.readline().split()]
r = np.zeros(10**5)
for i in range(n):
	a, b = [int(x) for x in sys.stdin.readline().split()]
	r[a] += b
c = 0
for i,j in enumerate(r):
	c += j
	if c >= k:
		print(i)
		break

Fixed submission:
import sys
import numpy as np
import collections
n,k = [int(x) for x in sys.stdin.readline().split()]
r = collections.defaultdict(int)
for i in range(n):
	a, b = [int(x) for x in sys.stdin.readline().split()]
	r[a] += b
d = sorted(r.items())
c = 0
for i,j in enumerate(d):
	c += j[1]
	if c >= k:
		print(int(j[0]))
		break

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
import collections
n,k = [int(x) for x in sys.stdin.readline().split()]
r = collections.defaultdict(int)
for i in range(n):
	a, b = [int(x) for x in sys.stdin.readline().split()]
	r[a] += b
d = sorted(r.items())
c = 0
for i,j in enumerate(d):
	c += j
	if c >= k:
		print(int(i))
		break


Fixed submission:
import sys
import numpy as np
import collections
n,k = [int(x) for x in sys.stdin.readline().split()]
r = collections.defaultdict(int)
for i in range(n):
	a, b = [int(x) for x in sys.stdin.readline().split()]
	r[a] += b
d = sorted(r.items())
c = 0
for i,j in enumerate(d):
	c += j[1]
	if c >= k:
		print(int(j[0]))
		break

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
from collections import defaultdict as dd
n,k = [int(x) for x in sys.stdin.readline().split()]
r = dd(int)
for i in range(n):
	a, b = [int(x) for x in sys.stdin.readline().split()]
	r[a] += b
r.sort()
c = 0
for i,j in r.items():
	c += j
	if c >= k:
		print(i)
		break

Fixed submission:
import sys
import numpy as np
import collections
n,k = [int(x) for x in sys.stdin.readline().split()]
r = collections.defaultdict(int)
for i in range(n):
	a, b = [int(x) for x in sys.stdin.readline().split()]
	r[a] += b
d = sorted(r.items())
c = 0
for i,j in enumerate(d):
	c += j[1]
	if c >= k:
		print(int(j[0]))
		break

Buggy python submission (verdict: Runtime Error):
import sys
import numpy as np
n,k = [int(x) for x in sys.stdin.readline().split()]
r = np.array()
for i in range(n):
	r[i] = [int(x) for x in sys.stdin.readline().split()]
r.sort(key=lambda x:x[0])
c = 0
for i,j in enumerate(r):
	c += j[0]
	if c >= k:
		print(j[1])
		break

Fixed submission:
import sys
import numpy as np
import collections
n,k = [int(x) for x in sys.stdin.readline().split()]
r = collections.defaultdict(int)
for i in range(n):
	a, b = [int(x) for x in sys.stdin.readline().split()]
	r[a] += b
d = sorted(r.items())
c = 0
for i,j in enumerate(d):
	c += j[1]
	if c >= k:
		print(int(j[0]))
		break