#include using namespace std; #define rep(i,n) for (long long i=0;i<(long long)(n);i++) #define all(v) v.begin(),v.end() using ll=long long; using pll=pair; using tll=tuple; const ll INF=(1ll<<60); template void chmin(T &a,T b){ if(a>b){ a=b; } } template void chmax(T &a,T b){ if(a> n; map mp; while(n--){ string s; ll c; cin >> s >> c; mp[s]=c; } vector ans(8,0); for(auto &[a,b]:mp){ ans[b]++; } rep(i,8){ cout << ans[i] << endl; } }