package main import ( "bufio" "fmt" "os" "strconv" "strings" ) func main() { scanner := bufio.NewScanner(os.Stdin) scanner.Scan() n, _ := strconv.Atoi(scanner.Text()) cnt := make([]int, 8) mp := make(map[string]int) for i := 0; i < n; i++ { scanner.Scan() input := strings.Split(scanner.Text(), " ") s := input[0] c, _ := strconv.Atoi(input[1]) mp[s] = c } for k, v := range mp { cnt[v]++ _ = k } for i := 0; i < 8; i++ { fmt.Println(cnt[i]) } }