#include using namespace std; int main(){ int N; cin >> N; unordered_map mp; while(N--){ string S; int C; cin >> S >> C; mp[S] = C; } int ans[8] = {}; for(auto &x : mp) ans[x.second]++; for(auto x : ans) cout << x << endl; }