a=[0 for i in range(8)] n=int(input()) for i in range(n): n,c=input().split() a[int(c)]+=1 for k in a: print(k)