Buggy python submission (verdict: Time Limit Exceeded):
#200419C
N = int(input())
A = list(map(int,input().split()))
A = sorted(A)


for i in range(N-1):
    L = len(A)
    #print(A)
    Ans = 0
    for j in range(L):
        if A[j]==i+1:
            Ans += 1
        else:
            for k in range(Ans):
                A.remove(i+1)                
            break
    print(Ans)
    

        
print("0")

Fixed submission:
#200419C
N = int(input())
A = list(map(int,input().split()))
A = sorted(A)

count = 0
for i in range(N-1):
    L = len(A)
    #print(A)
    Ans = 0
    count += Ans
    for j in range(L-count):
        if A[count + j]==i+1:
            Ans += 1
        else:            
            break
    print(Ans)
    count += Ans

        
print("0")

Buggy python submission (verdict: Time Limit Exceeded):
#200419C
N = int(input())
A = list(map(int,input().split()))
A = sorted(A)

for i in range(N-1):
    print(A.count(i+1))
    for j in range(A.count(i+1)):
        A.remove(i +1)
        #print(A)


print("0")

Fixed submission:
#200419C
N = int(input())
A = list(map(int,input().split()))
A = sorted(A)

count = 0
for i in range(N-1):
    L = len(A)
    #print(A)
    Ans = 0
    count += Ans
    for j in range(L-count):
        if A[count + j]==i+1:
            Ans += 1
        else:            
            break
    print(Ans)
    count += Ans

        
print("0")

Buggy python submission (verdict: Time Limit Exceeded):
#200419C
N = int(input())
A = list(map(int,input().split()))
A = sorted(A)

for i in range(N-1):
    print(A.count(i+1))

print("0")
        

Fixed submission:
#200419C
N = int(input())
A = list(map(int,input().split()))
A = sorted(A)

count = 0
for i in range(N-1):
    L = len(A)
    #print(A)
    Ans = 0
    count += Ans
    for j in range(L-count):
        if A[count + j]==i+1:
            Ans += 1
        else:            
            break
    print(Ans)
    count += Ans

        
print("0")

Buggy python submission (verdict: Time Limit Exceeded):
#200419C
N = int(input())
A = list(map(int,input().split()))

for i in range(N-1):
    Ans = 0
    L = len(A)
    for j in range(L):
        if i+1 == A[L-j-1]:
            Ans += 1
            A.remove(A[L-j-1])
            #print(A)
    print(Ans)
print("0")

Fixed submission:
#200419C
N = int(input())
A = list(map(int,input().split()))
A = sorted(A)

count = 0
for i in range(N-1):
    L = len(A)
    #print(A)
    Ans = 0
    count += Ans
    for j in range(L-count):
        if A[count + j]==i+1:
            Ans += 1
        else:            
            break
    print(Ans)
    count += Ans

        
print("0")

Buggy python submission (verdict: Time Limit Exceeded):
#200419C
N = int(input())
A = list(map(int,input().split()))

for i in range(N-1):
    Ans = 0
    for j in range(N-1):
        if i+1 == A[j]:
            Ans += 1
    print(Ans)
print("0")

Fixed submission:
#200419C
N = int(input())
A = list(map(int,input().split()))
A = sorted(A)

count = 0
for i in range(N-1):
    L = len(A)
    #print(A)
    Ans = 0
    count += Ans
    for j in range(L-count):
        if A[count + j]==i+1:
            Ans += 1
        else:            
            break
    print(Ans)
    count += Ans

        
print("0")