students = [[1001, 80, 90], [1002, 90, 80], [1003, 70, 80]]
students.sort(key=lambda x: (-x[1], x[2], x[0]))
answer = []
for i in range(len(students)):
answer.append(students[i][0])
print(answer)
To embed this project on your website, copy the following code and paste it into your website's HTML: