Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=list(map(int,input().split()))
for i in range(1,n):
    count=0
    for j in range(i,n):
        if i==l[j-1]:
            count+=1
    print(count)
print(0)


Fixed submission:
n=int(input())
l=list(map(int,input().split()))
m=[0]*n
for i in l:
    m[i-1]+=1
for j in range(n):
    print(m[j])

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=list(map(int,input().split()))
for i in range(1,n):
    count=0
    for j in range(i-1,n-1):
        if i==l[j]:
            count+=1
    print(count)
print(0)


Fixed submission:
n=int(input())
l=list(map(int,input().split()))
m=[0]*n
for i in l:
    m[i-1]+=1
for j in range(n):
    print(m[j])

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=list(map(int,input().split()))
for i in range(1,n):
    print(l.count(i))
print(0)


Fixed submission:
n=int(input())
l=list(map(int,input().split()))
m=[0]*n
for i in l:
    m[i-1]+=1
for j in range(n):
    print(m[j])

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=input().split()
for i in range(1,n):
    print(l.count(str(i)))
print(0)


Fixed submission:
n=int(input())
l=list(map(int,input().split()))
m=[0]*n
for i in l:
    m[i-1]+=1
for j in range(n):
    print(m[j])

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=list(map(int,input().split()))
for i in range(1,n):
    k=l.count(i)
    print(k)
    for _ in range(k):
        l.remove(i)
print(0)


Fixed submission:
n=int(input())
l=list(map(int,input().split()))
m=[0]*n
for i in l:
    m[i-1]+=1
for j in range(n):
    print(m[j])

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=list(map(int,input().split()))
for i in range(1,n):
    print(l.count(i))
    for _ in range(l.count(i)):
        l.remove(i)
print(0)


Fixed submission:
n=int(input())
l=list(map(int,input().split()))
m=[0]*n
for i in l:
    m[i-1]+=1
for j in range(n):
    print(m[j])

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=list(map(int,input().split()))
for i in range(1,n):
    count=0
    for j in range(i-1,n-1):
        if l[j]==i:
            count+=1
    print(count)
print(0)


Fixed submission:
n=int(input())
l=list(map(int,input().split()))
m=[0]*n
for i in l:
    m[i-1]+=1
for j in range(n):
    print(m[j])

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=list(map(int,input().split()))
for i in range(1,n):
    print(l.count(i))
print(0)


Fixed submission:
n=int(input())
l=list(map(int,input().split()))
m=[0]*n
for i in l:
    m[i-1]+=1
for j in range(n):
    print(m[j])

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=list(map(int,input().split()))
m=[]
for i in range(1,n):
    m.append(l.count(i))
m.append(0)
for j in range(n):
    print(m[j])
    

Fixed submission:
n=int(input())
l=list(map(int,input().split()))
m=[0]*n
for i in l:
    m[i-1]+=1
for j in range(n):
    print(m[j])

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=list(map(int,input().split()))
m=[]
for i in range(1,n):
    m.append(l.count(i))
m.append(0)
for j in range(n):
    print(m[j])
    

Fixed submission:
n=int(input())
l=list(map(int,input().split()))
m=[0]*n
for i in l:
    m[i-1]+=1
for j in range(n):
    print(m[j])