n = int(input()) A = list(map(int, input().split())) t = [0] * A[0] for a in A: t[a-1] += 1 print(*t) for i in range(A[0]-1, 0, -1): t[i-1] += t[i] print(*t)