#include <bits/stdc++.h>
#define F(i,j,k) for(int i=(j);i<=(k);++i)
#define D(i,j,k) for(int i=(j);i>=(k);--i)
#define rep(it,s) for(__typeof(s.begin()) it=s.begin();it!=s.end();++it)
#define Rep(a,s) for(auto a:s)
#define PB push_back
#define MP make_pair
#define FF first
#define SS second
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
ll quick_pow(ll x,ll y,ll Mod){
    ll res=1;
    while(y){
        if(y&1)res=res*x%Mod;
        x=x*x%Mod,y>>=1;
    }
    return res;
}
ll inv(ll x,ll Mod){return quick_pow(x,Mod-2,Mod);}
namespace IO{
    template <class T>
    inline void read(T &x){
        x=0;int f=1;char ch=getchar();
        while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
        while(ch<='9'&&ch>='0')x=x*10+ch-'0',ch=getchar();
        x*=f;
    }
};
using namespace IO;
const int N=100005;
vector<int>ans,vec0,vec1;
bool calc(int x,int y){
	if(x==0||x==2)return 0;//没间隔 
	if(x>1&&y==0)return 0;
	if(x%2==0&&y<=1)return 0;
	if(x%2==0){
		ans.PB(2);
		x-=3;
	}
	while(x>1){
		ans.PB(1);
		x-=2;
	}
	return 1;
}
void solve(int x){
	int flag=1;
	ans.clear();
	//Rep(y,vec0){
	for(int i=0;i<vec0.size();i++){
		int y=vec0[i];
		flag&=calc(y-x,x);
		if(i+1!=vec0.size())ans.PB(vec1[i]+x);
	}
	if(flag){
		cout<<ans.size()<<'\n';
		Rep(y,ans)cout<<y<<' ';
		exit(0);
	}
}
char s[N];
int cnt0,cnt1;
int main(){
    #ifndef ONLINE_JUDGE
        freopen("in.txt","r",stdin);
        //freopen("out.txt","w",stdout);
    #endif
    scanf("%s\n",s+1);
	int n=strlen(s+1);
	//if(s[1]=='#')vec0.PB(1);
	F(i,1,n){
		if(s[i]=='_'){
			if(cnt1)vec1.PB(cnt1);
			cnt1=0,cnt0++;
		}
		else{
			if(!vec0.size())vec0.PB(cnt0+1);
			else if(cnt0)vec0.PB(cnt0);
			cnt0=0,cnt1++;
		}
	}
	vec0.PB(cnt0+1);
	if(cnt1)vec1.PB(cnt1);
	//Rep(y,vec0)cout<<y<<' ';cout<<endl;
	//Rep(y,vec1)cout<<y<<' ';cout<<endl;
	if(!vec1.size()){
		cout<<0<<"\n\n";
		return 0;
	}
	int mink=1e9;
	Rep(y,vec0)mink=min(mink,y);
	F(i,0,min(mink,3)){
		solve(i);
	}
	cout<<-1;
    return 0;
}