```
from collections import defaultdict
class Solution(object):
def findRightInterval(self, intervals):
"""
:type intervals: List[Interval]
:rtype: List[int]
"""
dic = defaultdict(lambda: -1)
for ind, interval in enumerate(intervals):
dic[ interval.start ] = ind
res = []
for i in intervals:
res.append( dic[ i.end ] )
return res
```