• + 0 comments

    if name == 'main': students=[] for _ in range(int(input())): name = input() score = float(input()) students.append([name,score]) a=[] b=0.0 c=[]

    for i in range (0,len(students)): a.append(students[i][1])

    a.sort()

    for i in range (0, len(a)-1):

    if(a[i]<a[i+1]):
        b=a[i+1]
        break
    else:
        continue  
    

    for i in range(0,len(students)): if(students[i][1]==b): c.append(students[i][0])

    else:
        continue 
    

    c.sort()
    for i in range(0,len(c)): print(c[i])