코드(성공)
n = int(input())
x = list(map(int, input().split(" ")))
lst = []
for i in range(n):
lst.append([x[i], i])
rank = 0
srtd = sorted(lst)
for j in range(n):
if j > 0 and srtd[j-1][0] < srtd[j][0]:
rank += 1
srtd[j].append(rank)
else:
srtd[j].append(rank)
for k in sorted(lst, key = lambda x : x[1]):
print(k[2], end = " ")