• + 0 comments

    Hope this will help

    records = []
    
    if __name__ == '__main__':
        for _ in range(int(input())):
            name = input()
            score = float(input())
            records.append([name, score])
            
    scores = sorted(list(set([i[1] for i in records])))
    scores = scores[1]
    a = []
    for i in records :
        if i[1] == scores :
            a.append(i[0])
    a1 = sorted(a)
    
    for i in a1 :
        print(i)