https://www.acmicpc.net/problem/18870
https://github.com/stellaluminary/Baekjoon
import sys
input = sys.stdin.readline
n = int(input())
l = list(map(int, input().split()))
s = sorted(set(l))
ans = []
for i in range(len(l)):
ans.append(s.index(l[i]))
print(*ans)
import sys
input = sys.stdin.readline
n = int(input())
l = list(map(int, input().split()))
s = sorted(set(l))
d = {s[i]:i for i in range(len(s))}
for i in l:
print(d[i], end=' ')