# No.504 ゲーム大会(ランキング)
n = int(input())
a = [int(input()) for i in range(n)]
score_k = a[0]
rank = 1

for i in range(n):
    if a[i] <= score_k:
        print(rank)
    else:
        rank += 1
        print(rank)