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