N = int(input())

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



# 辞書型を使い、valueでソートする

dic = {}

for i in range(N):

  dic[i] = A[i]



dic = sorted(dic.items(), key=lambda x:x[1])

for d in dic:

  print(d[0]+1, end=" ")

N = int(input())

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

 

ans = [0]*N

for i in range(N):

  ans[A[i]-1] = str(i+1)



for i in range(N):

  print(ans[i], end=' ')

N = int(input())
A = list(map(int, input().split()))
# 辞書型を使い、valueでソートする
dic = {}
for i in range(N):
    dic[i] = A[i]
dic = sorted(dic.items(), key=lambda x: x[1])
for d in dic:
    print(d[0] + 1, end=" ")

N = int(input())
A = list(map(int, input().split()))
ans = [0] * N
for i in range(N):
    ans[A[i] - 1] = str(i + 1)
for i in range(N):
    print(ans[i], end=" ")

-# 辞書型を使い、valueでソートする -dic = {} +ans = [0] * N -    dic[i] = A[i] -dic = sorted(dic.items(), key=lambda x: x[1]) -for d in dic: -    print(d[0] + 1, end=" ") +    ans[A[i] - 1] = str(i + 1) +for i in range(N): +    print(ans[i], end=" ")