# import pypyjit # pypyjit.set_param('max_unroll_recursion=-1') from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline N = int(input()) A = list(map(int,input().split())) def cle(a,D): y = len(D)-1 x = 0 if D[x]>a: return 0 if D[y]<=a: return y+1 while y-x>1: mid = (y+x)//2 if D[mid]<=a: x = mid else: y = mid return y X = A[0] A = [-i for i in A] A.sort() ans = [] for i in range(1,X+1): tmp = cle(-i,A) ans.append(tmp) print(*ans)