#include<iostream>
#include<string>
using namespace std;
int main(){
int letters[52] = {};
char sentence[32];
char* ptr = sentence;
cin >> sentence;
for( int i = 0; i < 32; i++ ){
int temp = static_cast< int >( ptr[i] ) - 81;
cout << temp;
letters[temp]++;
}
for( int j = 0; j < 52; j++ ){
cout << letters[j] << endl;
}
}