import heapq



n = int(eval(input()))

list = []



idx = 1

for count_str in input().split():

    count = int(count_str)

    heapq.heappush(list, (count, idx))

    

    idx += 1



print((" ".join([ str(heapq.heappop(list)[1]) for _ in range(n) ])))

import heapq



n = int(eval(input()))

priority_list = []



student = 0

for priority in list(map(int, input().split())):

    student += 1

    priority_list.append((priority, str(student)))



heapq.heapify(priority_list)



print((' '.join([ heapq.heappop(priority_list)[1] for _ in range(n) ])))
import heapq

n = int(eval(input()))
list = []
idx = 1
for count_str in input().split():
    count = int(count_str)
    heapq.heappush(list, (count, idx))
    idx += 1
print((" ".join([str(heapq.heappop(list)[1]) for _ in range(n)])))

import heapq

n = int(eval(input()))
priority_list = []
student = 0
for priority in list(map(int, input().split())):
    student += 1
    priority_list.append((priority, str(student)))
heapq.heapify(priority_list)
print((" ".join([heapq.heappop(priority_list)[1] for _ in range(n)])))

-list = [] -idx = 1 -for count_str in input().split(): -    count = int(count_str) -    heapq.heappush(list, (count, idx)) -    idx += 1 -print((" ".join([str(heapq.heappop(list)[1]) for _ in range(n)]))) +priority_list = [] +student = 0 +for priority in list(map(int, input().split())): +    student += 1 +    priority_list.append((priority, str(student))) +heapq.heapify(priority_list) +print((" ".join([heapq.heappop(priority_list)[1] for _ in range(n)])))