n = int(input().strip()) lst = list(map(int, input().split(" "))) res = [] for i in range(n): count = 0 for j in range(i): if lst[i] > lst[j]: count += 1 res.append(count) for i in res: print(i, end=' ')