fork download
  1. A=[input().split()for i in' '*int(input())]
  2. A.sort(key=lambda x:-float(x[1]))
  3. print(*[k for k,v in A])
Success #stdin #stdout 0.02s 27704KB
stdin
4
word .15
pepsi 4.6
anotherword 1.6
bus 3
stdout
pepsi bus anotherword word