n = int(eval(input()))

l = list(map(int, input().split(' ')))

d = {}

for i in range(n):

  d[l[i]] = i+1



t = []

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

    t.append(str(d[i]))

print((' '.join(t)))
n = int(eval(input()))

order = list(map(int, input().split(' ')))

d = {}

for i in range(n):

  d[order[i]] = str(i+1)

print((' '.join(list(d.values()))))

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

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

-l = list(map(int, input().split(" "))) +order = list(map(int, input().split(" "))) -    d[l[i]] = i + 1 -t = [] -for i in range(1, n + 1): -    t.append(str(d[i])) -print((" ".join(t))) +    d[order[i]] = str(i + 1) +print((" ".join(list(d.values()))))