Buggy python submission (verdict: Runtime Error):
N = int(input())
emp = list(map(int,input().split()))
list.sort()
for i in range(N):
    print(emp.index(i+2)-emp.index(i+1))


Fixed submission:
N = int(input())
emp = list(map(int,input().split()))
ans_l = [0]*(N+1)
for i in range(N-1):
    a = emp[i]
    ans_l[a] +=1
for i in range(1,N+1):
    print(ans_l[i])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
emp = list(map(int,input().split()))
emp.sort()
# def rem_val(arr, value):
#     while value in arr:
#         try:
#             arr.remove(value)
#         except:
#             break
for i in range(N):
    # if(len(emp)!=0):
    print(emp.count(i+1))
        # rem_val(emp,i+1)
    # else:
    #     print(0)


Fixed submission:
N = int(input())
emp = list(map(int,input().split()))
ans_l = [0]*(N+1)
for i in range(N-1):
    a = emp[i]
    ans_l[a] +=1
for i in range(1,N+1):
    print(ans_l[i])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
emp = list(map(int,input().split()))
emp.sort()
def rem_val(arr, value):
    while value in arr:
        try:
            arr.remove(value)
        except:
            break
for i in range(N):
    if(len(emp)!=0):
        print(emp.count(i+1))
        rem_val(emp,i+1)
    else:
        print(0)


Fixed submission:
N = int(input())
emp = list(map(int,input().split()))
ans_l = [0]*(N+1)
for i in range(N-1):
    a = emp[i]
    ans_l[a] +=1
for i in range(1,N+1):
    print(ans_l[i])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
emp = list(map(int,input().split()))
def rem_val(arr, value):
    while value in arr:
        try:
            arr.remove(value)
        except:
            break
for i in range(N):
    print(emp.count(i+1))
    rem_val(emp,i+1)


Fixed submission:
N = int(input())
emp = list(map(int,input().split()))
ans_l = [0]*(N+1)
for i in range(N-1):
    a = emp[i]
    ans_l[a] +=1
for i in range(1,N+1):
    print(ans_l[i])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
emp = list(map(int,input().split()))
def rem_val(arr, value):
    while value in arr:
        try:
            arr.remove(value)
        except:
            pass
for i in range(N):
    print(emp.count(i+1))
    rem_val(emp,i+1)


Fixed submission:
N = int(input())
emp = list(map(int,input().split()))
ans_l = [0]*(N+1)
for i in range(N-1):
    a = emp[i]
    ans_l[a] +=1
for i in range(1,N+1):
    print(ans_l[i])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
emp = list(map(int,input().split()))
def rem_val(arr, value):
    while value in arr:
        arr.remove(value)

for i in range(N):
    print(emp.count(i+1))
    rem_val(emp,i+1)


Fixed submission:
N = int(input())
emp = list(map(int,input().split()))
ans_l = [0]*(N+1)
for i in range(N-1):
    a = emp[i]
    ans_l[a] +=1
for i in range(1,N+1):
    print(ans_l[i])

Buggy python submission (verdict: Runtime Error):
N = int(input())
emp = list(map(int,input().split()))
for i in range(N):
    print(emp.count(i+1))
    emp.remove(i+1)


Fixed submission:
N = int(input())
emp = list(map(int,input().split()))
ans_l = [0]*(N+1)
for i in range(N-1):
    a = emp[i]
    ans_l[a] +=1
for i in range(1,N+1):
    print(ans_l[i])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
emp = list(map(int,input().split()))
emp.sort()

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


Fixed submission:
N = int(input())
emp = list(map(int,input().split()))
ans_l = [0]*(N+1)
for i in range(N-1):
    a = emp[i]
    ans_l[a] +=1
for i in range(1,N+1):
    print(ans_l[i])

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


Fixed submission:
N = int(input())
emp = list(map(int,input().split()))
ans_l = [0]*(N+1)
for i in range(N-1):
    a = emp[i]
    ans_l[a] +=1
for i in range(1,N+1):
    print(ans_l[i])