• + 1 comment
    if __name__ == '__main__':
        records = []
        for _ in range(int(input())):
            name = input()
            score = float(input())
            records.append([name,score])
    # record and sort the grades of each student while removing the duplicates
        grades = sorted(list(set([record[1] for record in records])))
        
    # Finding the second lowest value
    second_lowest = grades[1]
    
    # Store and display the student names who has the second lowest scores
    students = sorted(record[0] for record in records if record[1] == second_lowest)
    for i in students:
        print(i)