# coding: utf-8

N = int(input())

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

for i in range(N):

    A[i] = [A[i]]

    A[i].append(i+1)

A.sort(key=lambda x: x[0])

for i in range(N):

    print(A[i][1], end=" ")

# coding: utf-8

N = int(input())

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

ans = [[i+1] for i in range(N)]

for i in range(N):

    ans[i].append(A[i])

ans.sort(key=lambda x: x[1])

for i in range(N):

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

# coding: utf-8
N = int(input())
A = list(map(int, input().split()))
for i in range(N):
    A[i] = [A[i]]
    A[i].append(i + 1)
A.sort(key=lambda x: x[0])
for i in range(N):
    print(A[i][1], end=" ")

# coding: utf-8
N = int(input())
A = list(map(int, input().split()))
ans = [[i + 1] for i in range(N)]
for i in range(N):
    ans[i].append(A[i])
ans.sort(key=lambda x: x[1])
for i in range(N):
    print(ans[i][0], end=" ")

+ans = [[i + 1] for i in range(N)] -    A[i] = [A[i]] -    A[i].append(i + 1) -A.sort(key=lambda x: x[0]) +    ans[i].append(A[i]) +ans.sort(key=lambda x: x[1]) -    print(A[i][1], end=" ") +    print(ans[i][0], end=" ")