#include using namespace std; int main() { int N; cin >> N; map mp; for( int i = 0; i < N; i++ ) { string s; int c; cin >> s >> c; mp[s] = c; } vector a( 8 ); for( auto it = mp.begin(); it != mp.end(); it++ ) { a[ it->second ]++; } for( int e : a ) cout << e << endl; }