import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] count = new int[8]; while(N-->0){ sc.next(); int C = sc.nextInt(); count[C]++; } for(int ans:count) System.out.println(ans); } }