#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } int main() { fast_io(); int n; cin >> n; map mp; for (int i = 0; i < n; i++) { string s; int c; cin >> s >> c; mp[s] = c; } vector cnt(8); for (auto [_, v] : mp) { cnt[v]++; } for (int i = 0; i < 8; i++) { cout << cnt[i] << "\n"; } }