n = int(input())
sp = [list(map(str, input().split())) for i in range(n)]
for i in range(n):
  sp[i][1] = int(sp[i][1]) * -1
x = sorted(sp)
for i in range(n):
  print(sp.index(x[i])+1) n = int(input()) n int(input()) int input() input list(map(str, input().split())) for i in range(n) for i in range(n) i range(n) range n for i in range(n) list(map(str, input().split())) list map(str, input().split()) map str input().split() ().split () input split sp = [list(map(str, input().split())) for i in range(n)] sp [list(map(str, input().split())) for i in range(n)] for i in range(n):
  sp[i][1] = int(sp[i][1]) * -1 i range(n) range n sp[i][1] = int(sp[i][1]) * -1 sp[i][1] [i] sp i 1 int(sp[i][1]) * -1 int(sp[i][1]) int sp[i][1] [i] sp i 1 -1 x = sorted(sp) x sorted(sp) sorted sp for i in range(n):
  print(sp.index(x[i])+1) i range(n) range n print(sp.index(x[i])+1) print sp.index(x[i])+1 sp.index(x[i]) sp.index sp index x[i] x i 1 n = int(input()) int(input()) n x = sorted(sp) sorted(sp) x sp = [list(map(str, input().split())) for i in range(n)] [list(map(str, input().split())) for i in range(n)] sp
n = int(input())
sp = [list(map(str, input().split())) for i in range(n)]
for i in range(n):
  sp[i][1] = int(sp[i][1]) * -1
x = sorted(sp)
for i in range(n):
  print(sp.index(x[i])+1)