N = int(input())

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

dic = {}

for i in range(N):

    dic[i+1] = a[i]

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

for i in range(N):

    print(dic_sorted[i][0],'',end="")

N = int(eval(input()))

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

arr2 = [0]*N

for i in range(N):

    arr2[arr[i]-1] = i+1

print((*arr2))
N = int(input())
a = list(map(int, input().split()))
dic = {}
for i in range(N):
    dic[i + 1] = a[i]
dic_sorted = sorted(dic.items(), key=lambda x: x[1])
for i in range(N):
    print(dic_sorted[i][0], "", end="")

N = int(eval(input()))
arr = list(map(int, input().split()))
arr2 = [0] * N
for i in range(N):
    arr2[arr[i] - 1] = i + 1
print((*arr2))

-N = int(input()) -a = list(map(int, input().split())) -dic = {} +N = int(eval(input())) +arr = list(map(int, input().split())) +arr2 = [0] * N -    dic[i + 1] = a[i] -dic_sorted = sorted(dic.items(), key=lambda x: x[1]) -for i in range(N): -    print(dic_sorted[i][0], "", end="") +    arr2[arr[i] - 1] = i + 1 +print((*arr2))