class Solution:
def findRightInterval(self, intervals: List[List[int]]) -> List[int]:
N = len(intervals)
start = []
answer = []
for i, v in enumerate(intervals):
s, e = v
start.append((s, i))
start.sort()
for _, e in intervals:
i = bisect_left(start, (e, ))
answer.append(-1 if i >= N else start[i][1])
return answer