• + 0 comments
    if __name__ == '__main__':
        record = {}
        for _ in range(int(input())):
            name = input()
            score = float(input())
            record[score] = record.get(score, []) + [name]
            
        second_lowest = sorted(list(record.keys()))[1]
        for name in sorted(record[second_lowest]):
            print(name)