import math

def py():

    print("Yes")

def pn():

    print("No")

def iin():

    x = int(input())

    return x



neko = 0

nya = 0

nuko = 0



n = iin()

a = [int(x) for x in input().split()]

b = [0] * n

for i in range(n):

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



for i in range(n):

    print(b[i],end=' ')

n = int(input())

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

b = [None] * n

for i in range(n):

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

for i in range(n):

    print(b[i],end = ' ')

import math


def py():
    print("Yes")


def pn():
    print("No")


def iin():
    x = int(input())
    return x


neko = 0
nya = 0
nuko = 0
n = iin()
a = [int(x) for x in input().split()]
b = [0] * n
for i in range(n):
    b[a[i] - 1] = i + 1
for i in range(n):
    print(b[i], end=" ")

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

-import math - - -def py(): -    print("Yes") - - -def pn(): -    print("No") - - -def iin(): -    x = int(input()) -    return x - - -neko = 0 -nya = 0 -nuko = 0 -n = iin() -a = [int(x) for x in input().split()] -b = [0] * n +n = int(input()) +a = list(map(int, input().split())) +b = [None] * n