n = int(eval(input()))

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

map = {}

for i in range(n):

    map[array[i]] = str(i+1)

list = []

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

    list.append(map[i])

print((" ".join(list)))
n = int(eval(input()))

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

map = {}

for i in range(n):

    map[array[i]] = str(i+1)

print((" ".join([map[i] for i in range(1, n+1)])))
n = int(eval(input()))
array = list(map(int, input().split()))
map = {}
for i in range(n):
    map[array[i]] = str(i + 1)
list = []
for i in range(1, n + 1):
    list.append(map[i])
print((" ".join(list)))

n = int(eval(input()))
array = list(map(int, input().split()))
map = {}
for i in range(n):
    map[array[i]] = str(i + 1)
print((" ".join([map[i] for i in range(1, n + 1)])))

-list = [] -for i in range(1, n + 1): -    list.append(map[i]) -print((" ".join(list))) +print((" ".join([map[i] for i in range(1, n + 1)])))