n = int(eval(input()))

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



ans = [0 for i in range(n)]

for i, name in enumerate(a):

    ans[name-1] = i+1

print((*ans))

n = int(eval(input()))

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

ans = [0 for i in range(n)]

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

    ans[a.pop()-1] = i

    

print((*ans))

n = int(eval(input()))
a = list(map(int, input().split()))
ans = [0 for i in range(n)]
for i, name in enumerate(a):
    ans[name - 1] = i + 1
print((*ans))

n = int(eval(input()))
a = list(map(int, input().split()))
ans = [0 for i in range(n)]
for i in reversed(list(range(1, n + 1))):
    ans[a.pop() - 1] = i
print((*ans))

-for i, name in enumerate(a): -    ans[name - 1] = i + 1 +for i in reversed(list(range(1, n + 1))): +    ans[a.pop() - 1] = i