N = int(input())

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

my_list = []

for i in range(len(A_list)):

    my_list.append((A_list[i], i+1))

my_list.sort()

for val in my_list:

    print(val[1], end=" ")

print()

N = int(input())

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

# my_list = []

# for i in range(len(A_list)):

#     my_list.append((A_list[i], i+1))

# my_list.sort()

# for val in my_list:

#     print(val[1], end=" ")

# print()



my_list = [0] * N

for i in range(len(A_list)):

    my_list[A_list[i] - 1] = i + 1

for val in my_list:

    print(val, end=" ")

print()

N = int(input())
A_list = list(map(int, input().split()))
my_list = []
for i in range(len(A_list)):
    my_list.append((A_list[i], i + 1))
my_list.sort()
for val in my_list:
    print(val[1], end=" ")
print()

N = int(input())
A_list = list(map(int, input().split()))
# my_list = []
# for i in range(len(A_list)):
#     my_list.append((A_list[i], i+1))
# my_list.sort()
# for val in my_list:
#     print(val[1], end=" ")
# print()
my_list = [0] * N
for i in range(len(A_list)):
    my_list[A_list[i] - 1] = i + 1
for val in my_list:
    print(val, end=" ")
print()

-my_list = [] +# my_list = [] +# for i in range(len(A_list)): +#     my_list.append((A_list[i], i+1)) +# my_list.sort() +# for val in my_list: +#     print(val[1], end=" ") +# print() +my_list = [0] * N -    my_list.append((A_list[i], i + 1)) -my_list.sort() +    my_list[A_list[i] - 1] = i + 1 -    print(val[1], end=" ") +    print(val, end=" ")