#include using namespace std; #ifdef _RUTHEN #include #else #define show(...) true #endif using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) template using V = vector; int main() { ios::sync_with_stdio(false); cin.tie(0); int N; cin >> N; map mp; rep(i, N) { string s; int c; cin >> s >> c; mp[s] = c; } V cnt(8); for (auto [s, c] : mp) cnt[c]++; rep(i, 8) cout << cnt[i] << '\n'; return 0; }