n = int(eval(input()))

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



N = list(range(1, n + 1))

c = sorted(zip(A, N))

A, N = list(zip(*c))



print((*N))

n = int(eval(input()))

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

N = sorted(list(range(1, n + 1)), key=lambda x: A[x - 1])

print((*N))
n = int(eval(input()))
A = list(map(int, input().split()))
N = list(range(1, n + 1))
c = sorted(zip(A, N))
A, N = list(zip(*c))
print((*N))

n = int(eval(input()))
A = list(map(int, input().split()))
N = sorted(list(range(1, n + 1)), key=lambda x: A[x - 1])
print((*N))

-N = list(range(1, n + 1)) -c = sorted(zip(A, N)) -A, N = list(zip(*c)) +N = sorted(list(range(1, n + 1)), key=lambda x: A[x - 1])