Problem: Joseph really likes the culture of Japan. Last year he learned Japanese traditional clothes and visual arts and now he is trying to find out the secret of the Japanese game called Nonogram.

In the one-dimensional version of the game, there is a row of n empty cells, some of which are to be filled with a pen. There is a description of a solution called a profile — a sequence of positive integers denoting the lengths of consecutive sets of filled cells. For example, the profile of [4, 3, 1] means that there are sets of four, three, and one filled cell, in that order, with at least one empty cell between successive sets.

<image>

A suitable solution for n = 12 and p = [4, 3, 1]. 

<image>

A wrong solution: the first four filled cells should be consecutive. 

<image>

A wrong solution: there should be at least one empty cell before the last filled cell. 

Joseph found out that for some numbers n and profiles p there are lots of ways to fill the cells to satisfy the profile. Now he is in the process of solving a nonogram consisting of n cells and a profile p. He has already created a mask of p — he has filled all the cells that must be filled in every solution of the nonogram.

<image>

The mask for n = 12 and p = [4, 3, 1]: all the filled cells above are filled in every solution. 

After a break, he lost the source profile p. He only has n and the mask m. Help Joseph find any profile p' with the mask m or say that there is no such profile and Joseph has made a mistake.

Input

The only line contains a string m — the mask of the source profile p. The length of m is n (1 ≤ n ≤ 100 000). The string m consists of symbols # and _ — denoting filled and empty cells respectively.

Output

If there is no profile with the mask m, output the number -1. Otherwise, on the first line, output an integer k — the number of integers in the profile p'. On the second line, output k integers of the profile p'.

Examples

Input


__#_____


Output


2
3 2 


Input


_#


Output


-1


Input


___


Output


0

Solution (in CPP):

Solution:
#define _USE_MATH_DEFINES
#include<iostream>
#include<fstream>
#include<string>
#include<vector>
#include<utility>
#include<algorithm>
#include<climits>
#include<set>
#include<map>
#include<cmath>
#include<iomanip>
#include<iterator>
#include<queue>
#include<stack>
#include<cctype>
#include<deque>
#include<time.h>
#include<bitset>
#include<random>
#include <functional>
#include<unordered_set>
#include<unordered_map>
#include<random>
#include<numeric>
#include <chrono>
#include<sstream>
#include <valarray> 
#include<list>
#include<complex>
#include<cassert>

//by Skeef79

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:16777216")
#define pb push_back
#define en '\n'
#define forn(i,n) for(int i = 0;i<n;i++)
#define for0(i,n) for(int i = 0;i<n;i++)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define vec vector
#define pii pair<int,int>
#define pll pair<ll,ll>
#define szof(x) int(x.size())
#define vi vector<int>
#define vll vector<ll>
#define vvi vector<vector<int>>
#define vvll vector<vector<ll>>

using namespace std;

const int INF = 1000000000 + 1e8;
const ll LINF = 2000000000000000000;

template<typename T> void print(vector<T>& a)
{
	for (int i = 0; i < a.size(); i++)
		cout << a[i] << ' ';
	cout << en;
}

template<typename T> void print(vector<vector<T>>& a)
{
	for (int i = 0; i < a.size(); i++)
	{
		for (int j = 0; j < a[i].size(); j++)
			cout << a[i][j] << ' ';
		cout << en;
	}
}

template <typename T> void input(vector<T>& a)
{
	for (int i = 0; i < a.size(); i++)
		cin >> a[i];
}

template<typename T> void input(vector<vector<T>>& a)
{
	for (int i = 0; i < a.size(); i++)
		for (int j = 0; j < a[i].size(); j++)
			cin >> a[i][j];
}

//1 - #, 0 - _
vector <pii>a;
int n;
void build(string s)
{
	int cnt1 = 0, cnt2 = 0;
	for (int i = 0; i < n; i++)
	{
		if (s[i] == '#')
		{
			if (cnt2 != 0)
				a.pb({ cnt2,0 });
			cnt2 = 0;
			cnt1++;
		}
		else
		{
			if (cnt1 != 0)
				a.pb({ cnt1,1 });
			cnt1 = 0;
			cnt2++;
		}
	}
	if (cnt1 != 0)
		a.pb({ cnt1,1 });
	else
		a.pb({ cnt2,0 });
}

vector<int> check(vector<pii>a, int len)
{
	if (len == 1)
	{
		int ost = len % 2;
		if (a[0].first < len || a[0].first % 2 != ost)
			return { -1 };
		if (a.back().first < len || a.back().first % 2 != ost)
			return { -1 };

		int n = a.size();
		vector<int>ans;
		for (int j = 0; j < a[0].first / 2; j++)
			ans.pb(1);

		for (int i = 1; i < n - 1; i++)
			if (a[i].second == 0)
			{
				if (a[i].first <= len || a[i].first % 2 != 0)
					return { -1 };
				ans.pb(a[i - 1].first + len);
				for (int j = 0; j < (a[i].first - 1) / 2; j++)
					ans.pb(1);
			}
		ans.pb(a[n - 2].first + len);
		for (int j = 0; j < a.back().first / 2; j++)
			ans.pb(1);
		return ans;
	}
	else
		if (len == 2)
		{
			if (a[0].first < 2 || a[0].first == 3)
				return { -1 };
			if (a.back().first < 2 || a.back().first == 3)
				return { -1 };

			int n = a.size();
			vector<int>ans;
			int t1 = a[0].first - 3;
			while (t1 > 0)
			{
				if (t1 == 2)
				{
					ans.pb(2);
					t1 = 0;
				}
				else
					if (t1 == 1)
					{
						ans.pb(1);
						t1 = 0;
					}
					else
					{
						ans.pb(1);
						t1 -= 2;
					}
			}

			for (int i = 1; i < n - 1; i++)
				if (a[i].second == 0)
				{
					if (a[i].first <= len)
						return { -1 };
					if (a[i].first == len + 2)
						return { -1 };

					ans.pb(a[i - 1].first + len);
					int t = a[i].first - 4;
					while (t > 0)
					{
						if (t == 2)
						{
							ans.pb(2);
							t = 0;
						}
						else
							if (t == 1)
							{
								ans.pb(1);
								t = 0;
							}
							else
							{
								ans.pb(1);
								t -= 2;
							}
					}
				}

			ans.pb(a[n - 2].first + len);

			t1 = a.back().first - 3;
			while (t1 > 0)
			{

				if (t1 == 2)
				{
					ans.pb(2);
					t1 = 0;
				}
				else
					if (t1 == 1)
					{
						ans.pb(1);
						t1 = 0;
					}
					else
					{
						ans.pb(1);
						t1 -= 2;
					}
			}

			return ans;

		}
		else
		{
			if (a[0].first < 3 || a[0].first == 4)
				return { -1 };
			if (a.back().first < 3 || a.back().first == 4)
				return { -1 };

			int n = a.size();
			vector<int>ans;
			int t1 = a[0].first - 4;
			while (t1 > 0)
			{
				if (t1 == 2)
				{
					ans.pb(2);
					t1 = 0;
				}
				else
					if (t1 == 1)
					{
						ans.pb(1);
						t1 = 0;
					}
					else
					{
						ans.pb(1);
						t1 -= 2;
					}
			}

			for (int i = 1; i < n - 1; i++)
				if (a[i].second == 0)
				{
					if (a[i].first <= len)
						return { -1 };
					if (a[i].first == len + 2)
						return { -1 };

					ans.pb(a[i - 1].first + len);
					int t = a[i].first - 5;
					while (t > 0)
					{
						if (t == 2)
						{
							ans.pb(2);
							t = 0;
						}
						else
							if (t == 1)
							{
								ans.pb(1);
								t = 0;
							}
							else
							{
								ans.pb(1);
								t -= 2;
							}
					}
				}

			ans.pb(a[n - 2].first + len);

			t1 = a.back().first - 4;
			while (t1 > 0)
			{

				if (t1 == 2)
				{
					ans.pb(2);
					t1 = 0;
				}
				else
					if (t1 == 1)
					{
						ans.pb(1);
						t1 = 0;
					}
					else
					{
						ans.pb(1);
						t1 -= 2;
					}
			}

			return ans;
		}
}

void solve()
{
	string s;
	cin >> s;
	n = s.length();
	build(s);

	if (a[0].second == 1 || a.back().second == 1)
	{
		if (a[0].second == 1 && a.back().second == 1)
		{
			for (int i = 1; i < n; i++)
				if (s[i] == '_' && s[i - 1] == '_')
				{
					cout << -1;
					return;
				}

			vector<int>ans;
			for (auto to : a)
				if (to.second == 1)
					ans.pb(to.first);
			cout << ans.size() << en;
			print(ans);
		}
		else
			cout << -1;
		return;
	}

	if (a.size() == 1)
	{
		cout << 0 << en;
		return;
	}

	auto ans1 = check(a, 1);
	auto ans2 = check(a, 2);
	auto ans3 = check(a, 3);

	if (ans1[0] != -1)
	{
		cout << ans1.size() << en;
		print(ans1);
		return;
	}
	if (ans2[0] != -1)
	{
		cout << ans2.size() << en;
		print(ans2);
		return;
	}
	if (ans3[0] != -1)
	{
		cout << ans3.size() << en;
		print(ans3);
		return;
	}

	cout << -1;
}

int main()
{
	srand(time(0));
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);

#ifdef _DEBUG	
	freopen("input.txt", "r", stdin);
#endif


	//freopen("igoreha.in", "r", stdin);
	//freopen("igoreha.out", "w", stdout);

	int tst = 1;
	//cin >> tst;

	while (tst--)
		solve();

}