n = int(input())
m_list = list(map(int, input().split()))
c_list = [0]*11
b_list = []
for x in m_list:
    b_list.append(sum(c_list[:x]))
    c_list[x]+=1
print(*b_list)