f=input;f();print((*list(zip(*sorted((int(i),e+1) for e,i in enumerate(f().split()))))[1]))
n,*l=list(map(int,open(0).read().split()))

a=[0]*n

for i in range(n): a[l[i]-1]=i+1

print((*a))
f = input
f()
print((*list(zip(*sorted((int(i), e + 1) for e, i in enumerate(f().split()))))[1]))

n, *l = list(map(int, open(0).read().split()))
a = [0] * n
for i in range(n):
    a[l[i] - 1] = i + 1
print((*a))

-f = input -f() -print((*list(zip(*sorted((int(i), e + 1) for e, i in enumerate(f().split()))))[1])) +n, *l = list(map(int, open(0).read().split())) +a = [0] * n +for i in range(n): +    a[l[i] - 1] = i + 1 +print((*a))