• + 0 comments
    if __name__ == '__main__':
        score_dict = {}
        for _ in range(int(input())):
            name = input()
            score = float(input())
            if score not in score_dict:
                score_dict[score] = []
            score_dict[score].append(name)
        
        second_lowest_scores = sorted(score_dict.items())[1][1]
    
        for n in sorted(second_lowest_scores):
            print(n)