':type people: List[List[int]]
:rtype: List[List[int]]'

def reconstructQueue(self, people):

    people.sort(key=(lambda (h, k): ((- h), k)))
    result = []
    for p in people:
        result.insert(p[1], p)
    return result
