#include<iostream>
#include<sstream>
using namespace std;
//int转为string
string reversal(int x){
stringstream s1;
string s2;
s1 << x;
s1 >> s2;
return s2;
}
int main(){
string s,last;
int num;
while(cin>>s){
last+=s;
if(cin.get()=='\n'){
num=last.length();
break;
}
}
for(int i=0;i<num-1;i++){
cin>>s;
last+=s;
}
s="";
s+=reversal(num);
s+=" ";
num=0;
if(last[0]!='0'){
s+="0 ";
}
for(int i=1;i<=last.length();i++){
if(last[i]==last[i-1]){
num++;
}else{
s+=reversal(num+1);
s+=" ";
num=0;
}
}
cout<<s;
return 0;
}