AtCoder Beginner Contest 142 - Go to School

Takahashi is a teacher responsible for a class of N students.
The students are given distinct student numbers from 1 to N.
Today, all the students entered the classroom at different times.
According to Takahashi's record, there were A_i students in the classroom when student number i entered the classroom (including student number i).
From these records, reconstruct the order in which the students entered the classroom.

-----Constraints-----
 -  1 \le N \le 10^5 
 -  1 \le A_i \le N 
 -  A_i \neq A_j  (i \neq j)
 - All values in input are integers.

-----Input-----
Input is given from Standard Input in the following format:
N
A_1 A_2 \ldots A_N

-----Output-----
Print the student numbers of the students in the order the students entered the classroom.

-----Sample Input-----
3
2 3 1

-----Sample Output-----
3 1 2

First, student number 3 entered the classroom.
Then, student number 1 entered the classroom.
Finally, student number 2 entered the classroom.

Difficulty: EASY

Starter code:

Solutions:
N = int(input())
A = [int(i) for i in input().split()]
B = [0] * N
for (i, a) in enumerate(A):
	B[a - 1] = i + 1
print(*B)


n = int(input())
a = list(map(int, input().split()))
l = sorted([(a[i], i + 1) for i in range(n)])
c = [y for (x, y) in l]
print(' '.join(list(map(str, c))))


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


def main():
	N = int(input())
	A = list(map(int, input().split()))
	B = [[a, i + 1] for (i, a) in enumerate(A)]
	B.sort()
	for (i, j) in B:
		if i == N:
			print(j)
		else:
			print(j, '', end='')

def __starting_point():
	main()
__starting_point()


N = int(input())
A = tuple(map(int, input().split()))
L = [0] * N
for i in range(N):
	L[A[i] - 1] = i + 1
print(*L)


N = int(input())
a = list(map(int, input().split()))
b = [0] * N
for i in range(N):
	b[a[i] - 1] = i + 1
print(*b)


n = int(input())
lst = list(map(int, input().split()))
lst2 = [0 for i in range(n)]
for i in range(n):
	x = lst[i]
	lst2[x - 1] = i + 1
for i in range(n):
	if i != n - 1:
		print(lst2[i], end=' ')
	else:
		print(lst2[i])


N = int(input())
A = list(map(int, input().split()))
ls = [0] * N
for i in range(N):
	ls[A[i] - 1] = i + 1
print(*ls)


n = int(input())
a = [int(i) for i in input().split()]
b = [0] * n
for i in range(0, len(a)):
	b[a[i] - 1] = i + 1
print(*b)


N = int(input())
a = list(map(int, input().split()))
num = [0] * N
for i in range(N):
	num[a[i] - 1] = i
for i in num:
	print(i + 1, end=' ')


n = int(input())
a = map(int, input().split())
print(' '.join((str(i) for (a, i) in sorted(zip(a, range(1, n + 1))))))


input()
a = {j: i + 1 for (i, j) in enumerate(map(int, input().split()))}
print(*[j for (i, j) in sorted(a.items(), key=lambda x: x[0])])


n = int(input())
a = list(map(int, input().split()))
ans = []
for i in range(n):
	ans.append(0)
for i in range(n):
	ans[a[i] - 1] = i + 1
for i in range(len(ans)):
	print(ans[i], end=' ')


N = int(input())
A = list(map(int, input().split()))
B = [0] * N
for n in range(N):
	B[A[n] - 1] = n + 1
print(*B)


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


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


N = int(input())
A = list(map(int, input().split()))
l = [0] * N
for i in range(N):
	l[A[i] - 1] = str(i + 1)
print(' '.join(l))


(n, a) = open(0)
b = [0] * int(n)
for (i, t) in enumerate(a.split()):
	b[int(t) - 1] = i + 1
print(*b)


import numpy as np
n = int(input())
a = list(map(int, input().split()))
ans = np.empty(n, dtype=int)
for i in range(n):
	ans[a[i] - 1] = i + 1
print(*ans)


N = int(input())
A = list(map(int, input().split()))
for i in range(N):
	A[i] = [A[i], i]
A.sort()
for i in range(N):
	print(A[i][1] + 1, end=' ')
print()


n = int(input())
arr = list(map(int, input().split()))
d = {}
for (i, a) in enumerate(arr, 1):
	d[i] = a
d = sorted(d.items(), key=lambda x: x[1])
for x in dict(d).keys():
	print(x, end=' ')


N = int(input())
rst = [[] for i in range(N)]
A_ls = list(map(int, input().split(' ')))
for (i, j) in enumerate(A_ls):
	rst[j - 1] = i + 1
[print(i, end=' ') for i in rst]


N = int(input())
arr = list(map(int, input().split()))
arr2 = [0] * N
for i in range(N):
	arr2[arr[i] - 1] = i + 1
print(*arr2)


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


import numpy as np
n = input()
print(*np.argsort(list(map(int, input().split()))) + 1)


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


n = int(input())
A = list(map(int, input().split()))
L = [0] * n
for i in range(n):
	L[A[i] - 1] = i + 1
print(*L)


N = int(input())
A = [-1] * N
M = list(map(int, input().split()))
for i in range(N):
	A[M[i] - 1] = i + 1
print(*A)


n = int(input())
a = list(map(int, input().split()))
a = {a[i - 1]: i for i in range(1, n + 1)}
for x in sorted(a.items()):
	print(x[1], end=' ')


n = int(input())
a = map(int, input().split())
for (i, x) in sorted(enumerate(a), key=lambda x: x[1]):
	print(i + 1)


N = int(input())
li = list(map(int, input().split()))
ans = [0] * N
for i in range(N):
	ans[li[i] - 1] = i + 1
print(*ans)


(n, a) = open(0)
a = a.split()
print(*sorted(range(1, int(n) + 1), key=lambda x: int(a[x - 1])))


N = int(input())
A = list(map(int, input().split()))
lst = []
for i in range(N):
	lst.append([i + 1, A[i]])
lst.sort(key=lambda x: x[1])
for j in lst:
	print(j[0], end=' ')


[print(i, end=' ') for i in {m: i + 1 for (i, m) in zip(range(int(input())), list(map(int, input().split())))}.values()]


N = int(input())
A = [0] + list(map(int, input().split()))
print(*sorted(range(len(A)), key=lambda k: A[k])[1:])


n = int(input())
A = list(map(int, input().split()))
ans = list(range(n))
for i in range(n):
	ans[A[i] - 1] = i + 1
print(' '.join(map(str, ans)))


n = int(input())
an = list(map(int, input().split()))
keys = [i for i in range(1, n + 1)]
d = dict(zip(an, keys))
for i in range(1, n + 1):
	print(d[i], end=' ')


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


input()
a = sorted(enumerate(map(int, input().split()), start=1), key=lambda x: x[1])
print(*[i for (i, _) in a])


n = int(input())
a = list(map(int, input().split()))
b = [0] * n
for (i, a) in enumerate(a):
	b[a - 1] = i + 1
print(*b)


N = int(input())
order_number = {}
for (num, order) in enumerate(map(int, input().split())):
	order_number[num + 1] = order
for (order, number) in sorted(order_number.items(), key=lambda x: x[1]):
	print(order, end=' ')
print()


import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())))
ans = np.argsort(a)
print(*ans + 1)


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


N = int(input())
A = list(map(int, input().split()))
ans = [0] * N
for i in range(N):
	ans[A[i] - 1] = str(i + 1)
for i in range(N):
	print(ans[i], end=' ')


n = int(input())
a = list(map(int, input().split()))
b = [None] * n
for (idx, person) in enumerate(a):
	b[person - 1] = idx + 1
for j in b:
	print(j, end=' ')


N = int(input())
A = list(map(int, input().split()))
d = {a: i for (i, a) in zip(range(1, N + 1), A)}
print(*d.values())


N = int(input())
A = sorted(((a, i) for (i, a) in enumerate(map(int, input().split()))))
print(*(i + 1 for (a, i) in A))


n = int(input())
A = list(map(int, input().split()))
P = [0] * n
for i in range(n):
	P[A[i] - 1] = i + 1
print(*P, sep=' ')


n = int(input())
x = [0] * n
for (i, v) in enumerate(map(int, input().split())):
	x[v - 1] = i + 1
print(*x)


N = int(input())
A = list(map(int, input().split()))
for i in range(N):
	A[i] = (A[i], i + 1)
A.sort()
ans = ''
for tup in A:
	(v, i) = tup
	ans += str(i) + ' '
print(ans)


def main():
	import sys
	n = int(input())
	a = list(map(int, sys.stdin.readline().split()))
	c = []
	for i in range(1, n + 1):
		c.append((i, a[i - 1]))
	a = sorted(c, key=lambda x: x[1])
	for (i, idx) in a:
		print(i, end=' ')
main()


n = int(input())
h = tuple(map(int, input().split()))
ans = [0] * n
for i in range(n):
	ans[h[i] - 1] = i + 1
print(*ans)


N = int(input())
A = list(map(int, input().split()))
A2 = [0] * N
i = 1
for a in A:
	A2[a - 1] = i
	i += 1
print(*A2)


N = int(input())
A = list(map(int, input().split()))
B = [0] * N
C = ''
for i in range(N):
	B[A[i] - 1] = i + 1
for i in range(N):
	C += str(B[i]) + ' '
print(C[0:-1])


n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
for i in range(n):
	ans[a[i] - 1] += i + 1
	ans[a[i] - 1] = str(ans[a[i] - 1])
print(' '.join(ans))


N = int(input())
A_ls = list(map(int, input().split(' ')))
rst = [[] for i in range(N)]
for (idx, val) in enumerate(A_ls):
	rst[val - 1] = idx + 1
[print(i, end=' ') for i in rst]


n = int(input())
a = list(map(int, input().split()))
b = [None] * n
for (i, j) in enumerate(a):
	b[j - 1] = i + 1
print(*b)


N = int(input())
A = map(int, input().split())
L = [0] * N
for (i, val) in enumerate(A):
	L[val - 1] = i + 1
print(*L)


N = int(input())
A_list = list(map(int, input().split()))
B_list = [0] * N
for (i, A) in enumerate(A_list):
	B_list[A_list[i] - 1] = str(i + 1)
ans = ' '.join(B_list)
print(ans)


(n, *a) = map(int, open(0).read().split())
print(*list(zip(*sorted([[i + 1, j] for (i, j) in enumerate(a)], key=lambda x: x[1])))[0])


N = int(input())
A = list(map(int, input().split()))
print(*[t[1] for t in sorted(zip(A, range(1, N + 1)))])


def resolve():
	n = int(input())
	a = tuple(map(int, input().split()))
	attend = [0] * n
	for (i, j) in enumerate(a):
		attend[j - 1] = i + 1
	print(*attend)
resolve()


N = int(input())
h = [int(x) for x in input().split()]
t = [0] * N
for i in range(1, N + 1):
	t[h[i - 1] - 1] = i
print(*t)


N = int(input())
A = [int(i) for i in input().split()]
a = [0] * N
for i in range(N):
	a[A[i] - 1] = i + 1
print(*a)


N = int(input())
A = list(map(int, input().split()))
r = [0] * N
for (i, a) in enumerate(A):
	r[a - 1] = i + 1
print(*r)


N = int(input())
A = list(map(int, input().split()))
L = [[] for x in range(N)]
for i in range(N):
	L[i] = [A[i], i + 1]
L.sort()
ANS = [0 for i in range(N)]
for i in range(N):
	ANS[i] = L[i][1]
print(*ANS)


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


n = int(input())
print(*[i + 1 for (i, _) in sorted(enumerate(map(int, input().split())), key=lambda iv: iv[1])])


n = int(input())
l = list(map(int, input().split()))
d = [0] * n
for (i, val) in enumerate(l):
	d[val - 1] = i + 1
print(*d)


(n, *aa) = map(int, open(0).read().split())
print(*(x[1] for x in sorted(zip(aa, range(1, n + 1)))))


N = int(input())
A = list(map(int, input().split()))
arr = [None] * N
for a in range(N):
	arr[A[a] - 1] = a + 1
print(*arr)


(n, *a) = map(int, open(0).read().split())
print(*[i + 1 for (x, i) in sorted([(x, i) for (i, x) in enumerate(a)])])


N = int(input())
A = map(int, input().split())
ans = [i for (_, i) in sorted(zip(A, list(range(1, N + 1))))]
print(*ans)


n = int(input())
a = list(map(int, input().split()))
ans = [None] * n
for i in range(len(a)):
	ans[a[i] - 1] = i + 1
print(*ans)


n = int(input())
a = [int(x) for x in input().split()]
ans = [0] * n
for i in range(0, n):
	ans[a[i] - 1] = i + 1
print(*ans)


N = int(input())
A = list(map(int, input().split()))
order = []
for (n, a) in enumerate(A):
	order.append([n + 1, a])
order.sort(key=lambda x: x[1])
for (Num, num) in order:
	print(Num, end=' ')
print()


n = int(input())
a = list(map(int, input().split()))
ans_h = {}
ans = []
for (i, ele) in enumerate(a):
	ans_h[ele] = i + 1
for i in range(1, n + 1):
	ans.append(str(ans_h[i]))
print(' '.join(ans))


n = int(input())
ans = [0] * n
for (num, i) in zip(input().split(), range(n)):
	ans[int(num) - 1] = str(i + 1)
print(' '.join(ans))


n = int(input())
a = list(map(int, input().split()))
p = [0] * n
t = 1
for i in a:
	p[i - 1] = t
	t += 1
print(*p)


n = int(input())
a = [int(x) for x in input().split()]
print(*[i for (a, i) in sorted(zip(a, range(1, n + 1)))])


n = int(input())
a = {int(x): i + 1 for (i, x) in enumerate(input().split())}
a = sorted(a.items())
b = [x[1] for x in a]
print(*b)


n = int(input())
h = list(map(int, input().split()))
q = [0] * n
for i in range(n):
	q[h[i] - 1] = i + 1
print(*q)


N = int(input())
l = list(map(int, input().split()))
m = [0] * N
for i in range(N):
	m[l[i] - 1] = i + 1
print(*m)


import sys
import math
from collections import defaultdict, deque, Counter
from copy import deepcopy
from bisect import bisect, bisect_right, bisect_left
from heapq import heapify, heappop, heappush
input = sys.stdin.readline

def RD():
	return input().rstrip()

def F():
	return float(input().rstrip())

def I():
	return int(input().rstrip())

def MI():
	return map(int, input().split())

def MF():
	return map(float, input().split())

def LI():
	return list(map(int, input().split()))

def TI():
	return tuple(map(int, input().split()))

def LF():
	return list(map(float, input().split()))

def Init(H, W, num):
	return [[num for i in range(W)] for j in range(H)]

def main():
	N = I()
	A = LI()
	A2 = []
	for i in range(N):
		A2.append([i + 1, A[i]])
	A2.sort(key=lambda x: x[1])
	ans = ''
	for (a, b) in A2:
		ans += str(a) + ' '
	print(ans)

def __starting_point():
	main()
__starting_point()


N = int(input())
A = [int(i) for i in input().split()]
ans = [0] * N
for i in range(N):
	ans[A[i] - 1] = i + 1
print(' '.join(map(str, ans)))


x = int(input())
y = list(map(int, input().split()))
z = [0] * x
for i in range(x):
	z[y[i] - 1] = i + 1
print(*z)


N = int(input())
A = list(map(int, input().split()))
X = [None] * N
for i in range(N):
	X[A[i] - 1] = i + 1
print(*X)


n = int(input())
li = list(map(int, input().split()))
an = [0] * n
for i in range(n):
	an[li[i] - 1] = i + 1
print(*an)


N = int(input())
A = list(map(int, input().split()))
B = [0] * (N + 1)
for i in range(N):
	B[A[i]] = i + 1
B.pop(0)
print(*B)


(N, *A) = map(int, open(0).read().split())
B = [0] * N
for i in range(N):
	B[A[i] - 1] = i + 1
print(*B)


n = int(input())
a = [0] * n
c = 1
for i in input().split(' '):
	a[int(i) - 1] = str(c)
	c += 1
print(' '.join(a))


N = int(input())
a = list(map(int, input().split()))
L = {}
for i in range(N):
	L[i] = a[i]
sort_L = sorted(L.items(), key=lambda x: x[1])
for j in sort_L:
	print(j[0] + 1, end=' ')


n = int(input())
l = [int(i) for i in input().split()]
A = [0] * (n + 1)
for i in range(1, n + 1):
	A[l[i - 1]] = i
print(*A[1:])


N = int(input())
A = [int(x) for x in input().split()]
B = [0] * N
for i in range(N):
	B[A[i] - 1] += i + 1
print(*B)


n = int(input())
print(*[v for (a, v) in sorted(zip((int(s) for s in input().split()), range(1, n + 1)))])


N = int(input())
A = [int(n) for n in input().split()]
ans = [0] * N
for (i, v) in enumerate(A):
	ans[v - 1] = i + 1
print(' '.join([str(n) for n in ans]))


n = int(input())
a = list(map(int, input().split()))
c = [0] * n
for j in range(n):
	c[a[j] - 1] = j + 1
print(*c)


import numpy
N = int(input())
A_list = list(map(int, input().split()))
ans_list = numpy.argsort(A_list)
for i in range(N):
	ans_list[i] += 1
print(*ans_list)


n = int(input())
A = list(map(int, input().split()))
L = [''] * n
for (i, a) in enumerate(A):
	L[a - 1] = str(i + 1)
print(' '.join(L))


N = int(input())
a = list(map(int, input().split()))
b = [0] * N
for (index, m) in enumerate(a):
	b[m - 1] = index + 1
print(*b)


(N, *A) = map(int, open(0).read().split())
print(*[i for (i, j) in sorted(enumerate(A, 1), key=lambda x: x[1])])


N = int(input())
A = list(map(int, input().split()))
lis = [0] * N
k = 1
for i in A:
	lis[i - 1] = k
	k += 1
lis = map(str, lis)
ans = ' '.join(lis)
print(ans)


n = int(input())
a = list(map(int, input().split()))
b = [[a[i], i + 1] for i in range(n)]
b.sort()
c = [i[1] for i in b]
print(*c)


N = int(input())
Alist = list(map(int, input().split()))
index = [i + 1 for i in range(N)]
Adict = dict(zip(Alist, index))
for i in range(1, N + 1):
	print(Adict[i], end=' ')


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


(N, *A) = map(int, open(0).read().split())
B = [0] * N
for (i, a) in enumerate(A, 1):
	B[a - 1] = i
print(*B)


n = int(input())
a = list(map(int, input().split()))
(_, a) = zip(*sorted(zip(a, range(n))))
print(*[x + 1 for x in a])


N = int(input())
A = list(map(int, input().split()))
dct = dict(enumerate(A))
ad = sorted(dct.items(), key=lambda x: x[1])
ans = []
for i in ad:
	j = i[0] + 1
	ans.append(j)
a = map(str, ans)
b = ' '.join(a)
print(b)


n = int(input())
l = list(map(int, input().split()))
ln = sorted([(l[i], i + 1) for i in range(n)])
print(*[i[1] for i in ln])


N = int(input())
L = [0] * N
for (x, i) in enumerate(list(map(int, input().split()))):
	L[i - 1] = str(x + 1)
print(' '.join(L))


n = int(input())
A = list(map(int, input().split()))
B = [(i + 1, A[i]) for i in range(n)]
B.sort(key=lambda x: x[1])
print(' '.join(list(map(str, [B[i][0] for i in range(n)]))))


import sys
input = sys.stdin.readline

def main():
	attended_people = []
	sorted_attended_people = []
	index_number = []
	answer = []
	n = int(input())
	attended_people = list(map(int, input().split()))
	index_number = [[idx, number] for (idx, number) in enumerate(attended_people)]
	sorted_attended_people = sorted(index_number, key=lambda x: x[1])
	for (idx, data) in sorted_attended_people:
		answer.append(str(idx + 1))
	print(' '.join(answer))

def __starting_point():
	main()
__starting_point()


n = int(input())
a = list(map(int, input().split()))
ans = [0] * n
for (i, j) in enumerate(a):
	ans[j - 1] = i + 1
print(*ans)


N = int(input())
(*A,) = map(int, input().split())
T = [0] * N
for i in range(N):
	T[~-A[i]] = i + 1
print(*T)


n = int(input())
a = list(map(int, input().split()))
l = []
for i in range(n):
	l.append([a[i], i + 1])
l = sorted(l)
ans = []
for j in range(n):
	ans.append(str(l[j][1]))
print(' '.join(ans))


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


n = int(input())
a_tmp = list(map(int, input().split()))
a = []
for i in range(n):
	a.append([a_tmp[i], i + 1])
a.sort(key=lambda x: x[0])
for i in range(n):
	print(a[i][1], end=' ')


n = int(input())
b = [''] * n
a = list(map(int, input().split()))
for i in range(n):
	b[a[i] - 1] = str(i + 1)
print(' '.join(b))


a = [0]
n = input()
a += list(map(int, input().split()))
print(*sorted(range(1, len(a)), key=a.__getitem__))


n = int(input())
A = tuple(map(int, input().split()))
Ans = [0] * n
for (i, a) in enumerate(A):
	Ans[a - 1] = i + 1
print(*Ans)


(_, *a) = map(int, open(0).read().split())
print(*[i for (i, __) in sorted(enumerate(a, 1), key=lambda l: l[1])])


N = int(input())
A = [int(i) for i in input().split()]
B = [(i + 1, A[i]) for i in range(N)]
B.sort(key=lambda x: x[1])
res = [str(b[0]) for b in B]
print(' '.join(res))


N = int(input())
(*A,) = map(int, input().split())
ans = [0] * N
for (i, a) in enumerate(A, 1):
	ans[a - 1] = i
print(*ans)


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


n = int(input())
a = [[int(x), i + 1] for (i, x) in enumerate(input().split())]
a.sort()
print(' '.join((str(i) for (x, i) in a)))


N = int(input())
A = list(map(int, input().split()))
t = [0] * N
for (idx, i) in enumerate(A):
	t[i - 1] = idx + 1
print(*t)


N = int(input())
A = [(int(_), i + 1) for (i, _) in enumerate(input().split())]
A.sort()
print(*[a[1] for a in A])


n = int(input())
an = list(map(int, input().split()))

class Solution:
	values = [i for i in range(1, n + 1)]

	def __init__(self, n, an):
		self.n = n
		self.an = an

	def answer(self):
		d = dict(zip(self.an, Solution.values))
		for i in range(1, n + 1):
			print(d[i], end=' ')
conditions = Solution(n, an)
conditions.answer()


N = int(input())
A = tuple(map(int, input().split()))
print(*sorted(range(1, N + 1), key=lambda i: A[i - 1]))


n = int(input())
l = list(map(int, input().split()))
t = [0] * n
i = 1
for e in l:
	t[e - 1] = str(i)
	i += 1
print(' '.join(t))


N = int(input())
L = list(map(int, input().split()))
d = {}
for i in range(N):
	d[L[i]] = i + 1
for j in range(1, N + 1):
	print(d[j], end=' ')


n = int(input())
a = map(int, input().split())
ans = [0] * n
for (i, ai) in enumerate(a):
	ans[ai - 1] = i + 1
print(*ans)


N = int(input())
A = [int(x) for x in input().split()]
ans = [None] * N
for (i, a) in enumerate(A):
	ans[a - 1] = i + 1
print(*ans)


n = int(input())
alst = list(map(int, input().split()))
ans = [-1 for _ in range(n)]
for (i, a) in enumerate(alst, start=1):
	ans[a - 1] = i
print(*ans)


N = int(input())
A = list(map(int, input().split()))
B = [0] * N
for (i, j) in enumerate(A):
	B[j - 1] = i + 1
print(*B)


n = int(input())
a = list(map(int, input().split()))
c = []
for i in range(1, n + 1):
	c.append((i, a[i - 1]))
a = sorted(c, key=lambda x: x[1])
for (i, idx) in a:
	print(i, end=' ')


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


n = int(input())
an = list(map(int, input().split()))
zyunban = [0] * n
t = 1
for x in an:
	zyunban[x - 1] = t
	t += 1
zyunban = list(map(str, zyunban))
print(' '.join(zyunban))


n = int(input())
arr = list(map(int, input().split()))
new_arr = [0] * len(arr)
for (i, a) in enumerate(arr, 1):
	new_arr[a - 1] = i
print(*new_arr)


n = int(input())
a = [int(i) for i in input().split()]
lst = [0 for _ in range(n)]
i = 1
for ai in a:
	lst[ai - 1] = i
	i += 1
print(' '.join([str(i) for i in lst]))


input()
print(' '.join([str(y[1]) for y in sorted([(int(x), i + 1) for (i, x) in enumerate(input().split())])]))


n = int(input())
A = zip(map(int, input().split()), range(1, n + 1))
print(*[a[1] for a in sorted(A)])


n = int(input())
a = list(map(int, input().split()))
print(*map(lambda x: x[1], sorted(zip(a, range(1, n + 1)))))


(n, *a) = map(int, open(0).read().split())
s = [[j, i] for (i, j) in zip(range(1, n + 1), a)]
s.sort()
print(*[i[1] for i in s])


n = int(input())
s = {i + 1: int(x) for (i, x) in enumerate(input().split())}
s = sorted(s.items(), key=lambda x: x[1])
for (i, j) in s:
	print(i, end=' ')