• + 1 comment
    if __name__ == '__main__':
        students = [(input(), float(input())) for _ in range(int(input()))]
        scores = set(map(lambda x: x[1], sorted(students, key=lambda x: x[1])))
        scores.remove(min(scores))
        print(*sorted(map(lambda x: x[0], filter(lambda x: x[1] == min(scores), students))), sep='\n')