#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; map m; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n; cin>>n; rep(i,n){ string s; int c; cin>>s>>c; m[s]=c; } vector ANS(8); for(auto [a,b]:m){ ANS[b]++; } rep(i,8) cout<