#include using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector cnt(8); map mp; for(int i = 0; i < n; i++){ string s; int c; cin >> s >> c; mp[s] = c; } for(auto &&p:mp){ cnt[p.second]++; } for(auto &&v:cnt)cout << v << '\n'; }