#![allow(clippy::let_unit_value)] #![allow(non_snake_case)] use std::{collections::HashMap, iter::zip}; use proconio::input; fn main() { input! { N:usize, } let mut C = Vec::new(); let mut S = Vec::new(); let mut color: HashMap = HashMap::new(); for i in 0..N { input! { s:String, c:usize } S.push(s); C.push(c); } for (s, c) in zip(S, C) { color.insert(s.to_string(), c); } let mut ans = vec![0_i32; 8]; for (key, value) in color.iter() { ans[*value] += 1; } for a in ans { println!("{}", a); } }