n = int(eval(input()))

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

L = [0] * n



for i,val in enumerate(A):

    L[val-1] = i + 1



print((*L))

n = int(eval(input()))

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

ans = [0] * n

for i in range(n):

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

  

ANS = [str(ans[i]) for i in range(n)]

print((" ".join(ANS)))
n = int(eval(input()))
A = list(map(int, input().split()))
L = [0] * n
for i, val in enumerate(A):
    L[val - 1] = i + 1
print((*L))

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

-L = [0] * n -for i, val in enumerate(A): -    L[val - 1] = i + 1 -print((*L)) +ans = [0] * n +for i in range(n): +    ans[A[i] - 1] = i + 1 +ANS = [str(ans[i]) for i in range(n)] +print((" ".join(ANS)))