#ABC-142-C

N = int(input())

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

ans_dict = {}



for idx, item in enumerate(A):

    ans_dict[item] = idx+1

    

sorted_dict = sorted(ans_dict.items(), key = lambda x:x[0])



for i in sorted_dict:

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

N = int(eval(input()))

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



memo = {}



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

    memo[i] = A[i-1]



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

# print(memo)

ans = []

for student, order in memo:

    ans.append(str(student))



print((" ".join(ans)))

# ABC-142-C
N = int(input())
A = list(map(int, input().split()))
ans_dict = {}
for idx, item in enumerate(A):
    ans_dict[item] = idx + 1
sorted_dict = sorted(ans_dict.items(), key=lambda x: x[0])
for i in sorted_dict:
    print(i[1], end=" ")

N = int(eval(input()))
A = list(map(int, input().split()))
memo = {}
for i in range(1, N + 1):
    memo[i] = A[i - 1]
memo = sorted(list(memo.items()), key=lambda x: x[1])
# print(memo)
ans = []
for student, order in memo:
    ans.append(str(student))
print((" ".join(ans)))

-# ABC-142-C -N = int(input()) +N = int(eval(input())) -ans_dict = {} -for idx, item in enumerate(A): -    ans_dict[item] = idx + 1 -sorted_dict = sorted(ans_dict.items(), key=lambda x: x[0]) -for i in sorted_dict: -    print(i[1], end=" ") +memo = {} +for i in range(1, N + 1): +    memo[i] = A[i - 1] +memo = sorted(list(memo.items()), key=lambda x: x[1]) +# print(memo) +ans = [] +for student, order in memo: +    ans.append(str(student)) +print((" ".join(ans)))