N = int(input())

A = [int(i) for i in input().split()]

dic = {}

for i, j in enumerate(A):

    dic[j] = i + 1

for k in range(1, N + 1):

    print(dic[k], end = " ")

N = int(eval(input()))

A = [int(i) for i in input().split()]

ans = [0] * N

for i in range(N):

    ans[A[i] - 1] = i + 1

print((*ans))
N = int(input())
A = [int(i) for i in input().split()]
dic = {}
for i, j in enumerate(A):
    dic[j] = i + 1
for k in range(1, N + 1):
    print(dic[k], end=" ")

N = int(eval(input()))
A = [int(i) for i in input().split()]
ans = [0] * N
for i in range(N):
    ans[A[i] - 1] = i + 1
print((*ans))

-N = int(input()) +N = int(eval(input())) -dic = {} -for i, j in enumerate(A): -    dic[j] = i + 1 -for k in range(1, N + 1): -    print(dic[k], end=" ") +ans = [0] * N +for i in range(N): +    ans[A[i] - 1] = i + 1 +print((*ans))