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

const int maxN = 1e5 + 10;

int n;
char s[maxN + 1];

inline void check(int d)
{	
	vector<int> res;
	for(int i = 1; i <= d; i++)
		if(s[i] == '#') return;
	int l = d + 1;
	while(l <= n)
	{
		int r = l;
		while(r <= n && s[r] == s[l]) r ++;
		if(s[l] == '#')
		{
			if(r + d - 1 > n) return;
			res.push_back(r - l + d);
			l = r + d;
		}
		else
		{
			int len = r - l - 1;
			if(l == d + 1 || r > n) len ++;
			if(len == 1 || len < 0) return;
			if(len && !d) return;
			if(!(len & 1))
				for(int i = 1; i <= len / 2; i++) res.push_back(1);
			else
			{
				if(d == 1) return;
				for(int i = 1; i < len / 2; i++) res.push_back(1);
				res.push_back(2);
			}
			l = r;
		}
	}
	printf("%d\n", (int)res.size());
	for(int i = 0; i < res.size(); i++) printf("%d ", res[i]);
	puts("");
	exit(0);
}

int main()
{
	scanf("%s", s + 1);
	n = strlen(s + 1);	

	int mn = n, l = 1;
	while(l <= n)
	{
		if(s[l] == '#') { l ++; continue; }
		int r = l;
		while(r <= n && s[r] == '_') r ++;
		int len = r - l - 1;
		if(l == 1 || r > n) len ++;
		mn = min(mn, len);
		l = r;
	}

	check(0); check(1); check(2), check(mn);

	puts("-1");
	return 0;
}
