n = int(eval(input()))

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

b = [(a[i], i+1) for i in range(n)]

b.sort()



print((' '.join([str(b[i][1]) for i in range(n)])))

n = int(eval(input()))

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



b = [0] * n

for i in range(n):

    b[a[i] - 1] = str(i + 1)



print((' '.join(b)))

n = int(eval(input()))
a = list(map(int, input().split()))
b = [(a[i], i + 1) for i in range(n)]
b.sort()
print((" ".join([str(b[i][1]) for i in range(n)])))

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

-b = [(a[i], i + 1) for i in range(n)] -b.sort() -print((" ".join([str(b[i][1]) for i in range(n)]))) +b = [0] * n +for i in range(n): +    b[a[i] - 1] = str(i + 1) +print((" ".join(b)))