N = int(input())

A = {i + 1: a for i, a in enumerate(input().split())}

sort_A = sorted(A.items(), key=lambda x: int(x[1]))



for i, a in sort_A:

    print(i, end=" ")

N = int(eval(input()))

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

idx = sorted(list(range(1, N + 1)), key=lambda x: A[x - 1])

idx = list(map(str, idx))

print((" ".join(idx)))

N = int(input())
A = {i + 1: a for i, a in enumerate(input().split())}
sort_A = sorted(A.items(), key=lambda x: int(x[1]))
for i, a in sort_A:
    print(i, end=" ")

N = int(eval(input()))
A = list(map(int, input().split()))
idx = sorted(list(range(1, N + 1)), key=lambda x: A[x - 1])
idx = list(map(str, idx))
print((" ".join(idx)))

-N = int(input()) -A = {i + 1: a for i, a in enumerate(input().split())} -sort_A = sorted(A.items(), key=lambda x: int(x[1])) -for i, a in sort_A: -    print(i, end=" ") +N = int(eval(input())) +A = list(map(int, input().split())) +idx = sorted(list(range(1, N + 1)), key=lambda x: A[x - 1]) +idx = list(map(str, idx)) +print((" ".join(idx)))