N = int(input())
A_list = []
for i in range(1,N+1):
    A = int(input())
    A_list.append([i,A])

pop_que =[]
ans_list= []

print(f"A_list:{A_list}")

for i in range(N):
    pop_que =A_list.pop(0)
    pop_que.append(max(A_list,key=lambda x:x[1]))
    A_list.append(pop_que)

#print(f"A_list[0]:{A_list[0]}")
#print(f"A_list[0][0]:{A_list[0][0]}")
#print(f"A_list[0][2][0]:{A_list[0][2][0]}")

for i in range(N):
    print(f"{A_list[i][2][1]}")