using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); public static void Main() { Solve(); } static void Solve() { var n = NN; var dic = new Dictionary(); for (var i = 0; i < n; ++i) { var s = ReadLine().Split(); dic[s[0]] = int.Parse(s[1]); } var count = new int[8]; foreach (var kv in dic) ++count[kv.Value]; WriteLine(string.Join("\n", count)); } }