• + 0 comments
    if __name__ == '__main__':
       
        nested_list=[]
        
        for _ in range(int(input())):
            name = input()
            score = float(input())
    
            nested_list.append([name, score])
      
        unique_sorted_list = sorted(list(set(x[1] for x in nested_list)))   
        second_lowest =unique_sorted_list[1]
        
        low_grades_list = []
        for student in nested_list:
            if second_lowest == student[1]: 
                low_grades_list.append(student[0])
    		 # Print all students with second low grades        
        for student in sorted(low_grades_list):
                print(student)