#include<bits/stdc++.h>

using namespace std;

#define ll long long

int main(){

    ll i=0,h=1;

    vector<char> a(5);

    for(int i=0;i<5;i++){
        cin>>a[i];
    }
    cout<<"1"<<" ";
    for(int i=0;i<4;i++){
        if(a[i]==a[i+1]){
            cout<<h<<" ";
        }
        else{
            h=h+1;
            cout<<h<<" ";
        }

    }


}