n = int(input()) A = list(map(int,input().split()))[::-1] m = A[-1] ans = [] now = 0 for i in range(m): while A[now] <= i: now += 1 ans.append(n-now) print(*ans)