n = int(input())

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

mydict = {}

for i in range(n):

    mydict[str(i+1)] = a[i]

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

for j in range(n):

    print(mydict[j][0], end=' ')

n = int(eval(input()))

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

anslist = [0] * n # 結果を収納するリスト。

for idx,elem in enumerate(a, start=1):

    anslist[elem - 1] = str(idx)

print((' '.join(anslist)))
n = int(input())
a = list(map(int, input().split()))
mydict = {}
for i in range(n):
    mydict[str(i + 1)] = a[i]
mydict = sorted(mydict.items(), key=lambda x: x[1])
for j in range(n):
    print(mydict[j][0], end=" ")

n = int(eval(input()))
a = list(map(int, input().split()))
anslist = [0] * n  # 結果を収納するリスト。
for idx, elem in enumerate(a, start=1):
    anslist[elem - 1] = str(idx)
print((" ".join(anslist)))

-n = int(input()) +n = int(eval(input())) -mydict = {} -for i in range(n): -    mydict[str(i + 1)] = a[i] -mydict = sorted(mydict.items(), key=lambda x: x[1]) -for j in range(n): -    print(mydict[j][0], end=" ") +anslist = [0] * n  # 結果を収納するリスト。 +for idx, elem in enumerate(a, start=1): +    anslist[elem - 1] = str(idx) +print((" ".join(anslist)))