#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

struct sb{
	int pl,pr,l,r;
}s[100500];
int i,j,k,n,m,t,mn=1145141919;
char sb[100500];
queue<int> q;

int main(){
	ios::sync_with_stdio(0);
	cin>>sb+1;
	n=strlen(sb+1);
	s[0].pr=-1;;
	for(i=1;i<=n;i++){
		if(sb[i]=='#'){
			if(sb[i-1]=='#'){s[m].pr=i;}
			else{s[++m].pl=i;s[m].pr=i;}
		}
	}
	if(!m){puts("0");return 0;}
	s[m+1].pl=n+2;
	for(i=1;i<=m;i++){
		s[i].l=s[i].pl-s[i-1].pr-2;
		s[i].r=s[i+1].pl-s[i].pr-2;
		mn=min({mn,s[i].l,s[i].r});
		//printf("%d %d\n",s[i].l,s[i].r);
	}
	s[m+1].l=s[m].r;
	for(i=1;i<=m;i++){
		if(s[i].l==mn+1||s[i].r==mn+1){mn-=2;break;}
	}
	if(mn<0){puts("-1");return 0;}
	for(i=1;i<=m+1;i++){
		j=s[i].l-mn;
		if((j&1)&&mn<2){puts("-1");return 0;}
		if(!mn&&s[i].l){puts("-1");return 0;}
		if(j&1){q.push(2);j-=3;}
		while(j){q.push(1);j-=2;}
		if(i<=m){q.push(s[i].pr-s[i].pl+1+mn);}
	}
	printf("%d\n",q.size());
	while(!q.empty()){
		printf("%d ",q.front());q.pop();
	}
}