n=int(input())

a=(input().split())

a1={}

for i in range(n):

    a1[(a[i])]=i+1

str1=""

for i in range(n):

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

print()



n=int(input())

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



rev=[0]*n

for i in range(n):

    rev[a[i]-1]=i+1

for i in range(n):

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

print()

n = int(input())
a = input().split()
a1 = {}
for i in range(n):
    a1[(a[i])] = i + 1
str1 = ""
for i in range(n):
    print(str(a1[str(i + 1)]), end=" ")
print()

n = int(input())
a = list(map(int, input().split()))
rev = [0] * n
for i in range(n):
    rev[a[i] - 1] = i + 1
for i in range(n):
    print(rev[i], end=" ")
print()

-a = input().split() -a1 = {} +a = list(map(int, input().split())) +rev = [0] * n -    a1[(a[i])] = i + 1 -str1 = "" +    rev[a[i] - 1] = i + 1 -    print(str(a1[str(i + 1)]), end=" ") +    print(rev[i], end=" ")