#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,x=0;
    cin>>n;
    int a[10]={0}; 
    for(int i=1;i<=n;i++){
        x=i;
        while(x!=0){
            a[x%10]++;
            x=x/10;
              
        }
    }
    for(int i=0;i<10;i++){
        cout<<a[i]<<endl;
    }
}
/**************************************************************
	Problem: 1178
	User: wengsihan
	Language: C++
	Result: Accepted
	Time:7 ms
	Memory:2072 kb
****************************************************************/