#include using namespace std; int main(){ int N; cin >> N; vector S(N); vector C(N); for (int i = 0; i < N; i++){ cin >> S[i] >> C[i]; } map mp; for (int i = 0; i < N; i++){ mp[S[i]] = C[i]; } vector ans(8, 0); for (pair P : mp){ ans[P.second]++; } for (int i = 0; i < 8; i++){ cout << ans[i] << endl; } }