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

pop_que =[]

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)

for i in range(N):
    print(A_list[i][2][1])
