#include <bits/stdc++.h>
#define fst first
#define snd second
#define fore(i,a,b) for(int i=a,ThxDem=b;i<ThxDem;++i)
#define pb push_back
#define ALL(s) s.begin(),s.end()
#define FIN ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define SZ(s) int(s.size())
using namespace std;
typedef long long ll;
typedef pair<int,int> ii;

string get(vector<int> &a, vector<int> &b){
	int ida=0,idb=0,n=SZ(a);
	string ans(n,'_');
	fore(i,0,n){
		if(!a[i]) ida+=i&&a[i-1];
		if(!b[i]) idb+=i&&b[i-1];
		if(a[i]&&b[i]&&ida==idb) ans[i]='#';
	}
	return ans;
}

void build(vector<int> &a){
	assert(a[0]);
	a.pb(0);
	vector<int> ans;
	int now=0;
	fore(i,0,SZ(a)){
		now+=a[i];
		if(i&&!a[i]){
			if(now) ans.pb(now);
			now=0;
		}
	}
	cout<<SZ(ans)<<"\n";
	for(auto x:ans)cout<<x<<" ";cout<<"\n";
	exit(0);
}

int main(){FIN;
	string s; cin>>s;
	
	int am=0;
	for(auto x:s) am+=x=='#';
	if(!am) cout<<"0\n",exit(0);
	
	int n=SZ(s);
	fore(k,0,4){
		vector<int> a(n);
		fore(i,0,n) a[i]=s[i]=='#';
		
		//build min
		int rem=0,see=s[0]=='#';
		
		for(int i=n-1;i>=0;i--){
			if(s[i]=='#') rem=k;
			else if(rem) a[i]=1,rem--;
		}
		if(rem) continue;
		
		
		fore(i,1,n-k){
			if(!a[i]&&!a[i-1]&&see){
				if(i+1<n&&a[i+1]){
					a[i-1]=1;
				}
				else a[i]=1;
			}
			see|=s[i]=='#';
		}
		a[n-k-1]=1;
		
		see=0;
		fore(i,0,n-k-1){
			if(see&&!a[i]&&!a[i+1]){
				a[i+1]=1;
			}
			see|=s[i]=='#';
		}
		
		
		//fix first
		int fs=-1;
		fore(i,0,n) if(a[i]&&fs<0) fs=i;
		
		//corregir prefijo
		if(fs>1){
			fore(i,0,fs) a[i]=i%2==0;
			if(fs&1) a[fs-1]=0,a[fs-2]=1;
		}
		
		
		if(!a[0]) continue;
		
		//build max
		int tot=0;
		for(int i=n-1;i>=0;i--){
			if(a[i])break;
			tot++;
		}
		vector<int> b(n);
		fore(i,0,n) if(a[i]) b[i+tot]=1;

		//test if valid
		if(get(a,b)==s) build(a);
	}
	cout<<"-1\n";
}