N = int(input())

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



A = list(enumerate(A))

A.sort(key = lambda x: x[1])



for i in range(N):

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

N = int(input())

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



# A = list(enumerate(A))

# A.sort(key = lambda x: x[1])

# for i in range(N):

#     print(A[i][0] + 1, end = " ")



A = sorted(range(N), key = lambda i: A[i])

for i in range(N):

    print(A[i]+1, end = " ")

N = int(input())
A = list(map(int, input().split()))
A = list(enumerate(A))
A.sort(key=lambda x: x[1])
for i in range(N):
    print(A[i][0] + 1, end=" ")

N = int(input())
A = list(map(int, input().split()))
# A = list(enumerate(A))
# A.sort(key = lambda x: x[1])
# for i in range(N):
#     print(A[i][0] + 1, end = " ")
A = sorted(range(N), key=lambda i: A[i])
for i in range(N):
    print(A[i] + 1, end=" ")

-A = list(enumerate(A)) -A.sort(key=lambda x: x[1]) +# A = list(enumerate(A)) +# A.sort(key = lambda x: x[1]) +# for i in range(N): +#     print(A[i][0] + 1, end = " ") +A = sorted(range(N), key=lambda i: A[i]) -    print(A[i][0] + 1, end=" ") +    print(A[i] + 1, end=" ")