N = int(input())

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



d = {}

for i, s in zip(range(1, N + 1), A):

    d[i] = s

d_sorted = sorted(d.items(), key=lambda x: x[1])



for i in range(N):

    print(d_sorted[i][0], end=" ")

N = int(eval(input()))

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



d = {}

for i, s in zip(list(range(1, N + 1)), A):

    d[i] = s

d_sorted = sorted(list(d.items()), key=lambda x: x[1])



for i in range(N):

    print((d_sorted[i][0]))
N = int(input())
A = list(map(int, input().split()))
d = {}
for i, s in zip(range(1, N + 1), A):
    d[i] = s
d_sorted = sorted(d.items(), key=lambda x: x[1])
for i in range(N):
    print(d_sorted[i][0], end=" ")

N = int(eval(input()))
A = list(map(int, input().split()))
d = {}
for i, s in zip(list(range(1, N + 1)), A):
    d[i] = s
d_sorted = sorted(list(d.items()), key=lambda x: x[1])
for i in range(N):
    print((d_sorted[i][0]))

-N = int(input()) +N = int(eval(input())) -for i, s in zip(range(1, N + 1), A): +for i, s in zip(list(range(1, N + 1)), A): -d_sorted = sorted(d.items(), key=lambda x: x[1]) +d_sorted = sorted(list(d.items()), key=lambda x: x[1]) -    print(d_sorted[i][0], end=" ") +    print((d_sorted[i][0]))