N=int(eval(input()))

Students=list(map(int,input().split()))





d={}



for i in range(N):

    d[i+1]=Students[i]



d_2 = sorted(list(d.items()),key=lambda x: x[1])



ans=[]

for k in d_2:

    ans.append(k[0])



print((*ans))
n=int(eval(input()))

a=list(map(int,input().split()))



b=[]

for i in range(n):

    tmp=[i+1,a[i]]

    b.append(tmp)



b=sorted(b,key=lambda x:x[1])





ans=[]

for j in b:

    ans.append(j[0])



print((*ans))
N = int(eval(input()))
Students = list(map(int, input().split()))
d = {}
for i in range(N):
    d[i + 1] = Students[i]
d_2 = sorted(list(d.items()), key=lambda x: x[1])
ans = []
for k in d_2:
    ans.append(k[0])
print((*ans))

n = int(eval(input()))
a = list(map(int, input().split()))
b = []
for i in range(n):
    tmp = [i + 1, a[i]]
    b.append(tmp)
b = sorted(b, key=lambda x: x[1])
ans = []
for j in b:
    ans.append(j[0])
print((*ans))

-N = int(eval(input())) -Students = list(map(int, input().split())) -d = {} -for i in range(N): -    d[i + 1] = Students[i] -d_2 = sorted(list(d.items()), key=lambda x: x[1]) +n = int(eval(input())) +a = list(map(int, input().split())) +b = [] +for i in range(n): +    tmp = [i + 1, a[i]] +    b.append(tmp) +b = sorted(b, key=lambda x: x[1]) -for k in d_2: -    ans.append(k[0]) +for j in b: +    ans.append(j[0])