using System; using System.Linq; using System.Collections.Generic; class Scanner { string[] s; int i; char[] cs = new char[] { ' ' }; public Scanner() { s = new string[0]; i = 0; } public string Next() { if (i < s.Length) return s[i++]; string st = Console.ReadLine(); while (st == "") st = Console.ReadLine(); s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries); if (s.Length == 0) return Next(); i = 0; return s[i++]; } public int NextInt() { return int.Parse(Next()); } public long NextLong() { return long.Parse(Next()); } } class Program { static void Main(string[] args) { // Comment var scanner = new Scanner(); int N = scanner.NextInt(); var dic = new Dictionary(); for (int i=0 ; i < N ; i++){ string s = scanner.Next(); int c = scanner.NextInt(); dic[s] = c; } int[] lis = new int[8]; foreach (var col in dic.Values){ lis[col]++; } for (int i=0 ; i < 8 ; i++){ Console.WriteLine(lis[i]); } } }