#define _GLIBCXX_DEBUG //遅い可能性がある #include #include #include //多倍長 using namespace boost::multiprecision; // 多倍長.型はcpp_int using namespace atcoder; using namespace std; // #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") // #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(a) (a).begin(),(a).end() //lower_bound(ALL(a),x) using ll = long long; using P = pair; using VI = vector; using VVI = vector>; int MOD = 998244353; int INF = 100100100; const vector dx = {1, 0, -1, 0}; const vector dy = {0, 1, 0, -1}; // int depth[110000]; // int mxdepth[110000]; long long modpow(long long a, long long n, long long mod) { long long res = 1; // a = 0の時は1を出力 if (a == 0) return 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } int main() { int n; cin >> n; map mp; rep(i,n) { string name; int c; cin >> name >> c; mp[name] = c; } vector C(8); for (auto nm = mp.begin(); nm != mp.end(); nm++) { int c = nm -> second; C[c]++; } rep(i,8) cout << C[i] << endl; }