• + 1 comment

    for _ in range(int(input())): new=[] scorelist=[] name = input() score = float(input()) scorelist.append(score) new+=[name, score] upda= sorted(set(scorelist))[1] for i,k in sorted(new): if k==upda: print(i)