Untitled

mail@pastecode.io avatar
unknown
python
a year ago
481 B
1
Indexable
Never
if __name__ == '__main__':
    list1 = []
    for _ in range(int(input())):
        name = input()
        score = float(input())
        list1.append(list(name,score))
    
    sorted_marks = sorted(list1, key = lambda list: list[1])
        
sorted_list_name = sorted(list1, key = lambda x : x[0])
sorted_list_marks = sorted(list1, key = lambda x : x[1])

IInd = list(set(sorted_list_marks[1]))

for i in sorted_list_name:
    if IInd == i[1]:
        print(i[0])