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:
#include<bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define SZ(x) ((int)x.size())
#define lowbit(x) x&-x
#define pb push_back
#define ALL(x) (x).begin(),(x).end()
#define UNI(x) sort(ALL(x)),x.resize(unique(ALL(x))-x.begin())
#define GETPOS(c,x) (lower_bound(ALL(c),x)-c.begin())
#define LEN(x) strlen(x)
#define MS0(x) memset((x),0,sizeof((x)))
#define Rint register int
#define ls (u<<1)
#define rs (u<<1|1)
typedef unsigned int unit;
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> Vi;
typedef vector<ll> Vll;
typedef vector<pii> Vpii;
template<class T> void _R(T &x) { cin >> x; }
void _R(int &x) { scanf("%d", &x); }
void _R(ll &x) { scanf("%lld", &x); }
void _R(ull &x) { scanf("%llu", &x); }
void _R(double &x) { scanf("%lf", &x); }
void _R(char &x) { scanf(" %c", &x); }
void _R(char *x) { scanf("%s", x); }
void R() {}
template<class T, class... U> void R(T &head, U &... tail) { _R(head); R(tail...); }
template<class T> void _W(const T &x) { cout << x; }
void _W(const int &x) { printf("%d", x); }
void _W(const ll &x) { printf("%lld", x); }
void _W(const double &x) { printf("%.16f", x); }
void _W(const char &x) { putchar(x); }
void _W(const char *x) { printf("%s", x); }
template<class T,class U> void _W(const pair<T,U> &x) {_W(x.fi);putchar(' '); _W(x.se);}
template<class T> void _W(const vector<T> &x) { for (auto i = x.begin(); i != x.end(); _W(*i++)) if (i != x.cbegin()) putchar(' '); }
void W() {}
template<class T, class... U> void W(const T &head, const U &... tail) { _W(head); putchar(sizeof...(tail) ? ' ' : '\n'); W(tail...); }
const int MOD=1e9+7,mod=998244353;
ll qpow(ll a,ll b) {ll res=1;a%=MOD; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%MOD;a=a*a%MOD;}return res;}
const int MAXN=5e5+10,MAXM=1e6+10;
const int INF=INT_MAX,SINF=0x3f3f3f3f;
const ll llINF=LLONG_MAX;
const int inv2=(MOD+1)/2;
const int Lim=1<<20;

char s[MAXN];
char t[MAXN];
int n;
Vi ans;
//______##____#######____##____#########_

void calc(int len)
{
    if(len>n)return;
    ans.clear();
    int m=n;
    for(int i=0;i<len;i++)
    {
        m--;
        if(s[m]=='#')return;
    }
    for(int i=0;i<m;i++)t[i]='_';
    for(int i=0;i<m;)
    {

        int u=i;
        while(u<m&&s[u]=='_')u++;
        if(u>=m)break;
        for(int j=len+1;j;j--)
        {
            int v=u-j;
            if(j<=len&&v<0)return;
            if(v>=0&&t[v]=='#')return;
            if(j<=len)t[v]='#';
        }
        while(u<m&&s[u]=='#')t[u++]='#';
        i=u;
    }
    int lst=0;
    for(int i=0;i<m;i++)
    {
        int u=i,cnt=0;
        while(u<m&&t[u]=='_')u++;
        if(u>=m)break;
        int dis=u-lst;
        if(dis)
        {
            if(!i)
            {
                if(dis==1)return;
                if(dis&1)
                {
                    if(len==1)return;
                    ans.pb(2),dis-=3;
                }
                while(dis>=2)ans.pb(1),dis-=2;
            }
            else
            {
                if(dis==3)return;
                if(dis&1)
                {
                    if(len==1)return;
                    ans.pb(2),dis-=3;
                }
                while(dis>2)ans.pb(1),dis-=2;
            }
        }
        while(u<m&&t[u]=='#')u++,cnt++;
        if(cnt)ans.pb(cnt);
        lst=u-1;
        i=u;
    }
    int dis=(m-1-lst);
    if(dis)
    {
        if(dis==1)return;
        if(dis&1)
        {
            if(len==1)return;
            ans.pb(2),dis-=3;
        }
        while(dis)ans.pb(1),dis-=2;
    }
    W(SZ(ans));
    W(ans);
    exit(0);
}

void solve()
{
    R(s);
    n=LEN(s);
    bool f=1,g=1;
    for(int i=0;i<n;i++)g&=(s[i]=='_');
    f&=(s[0]=='#');
    f&=(s[n-1]=='#');
    for(int i=2;i<n;i++)if(s[i]=='#')
    {
        if(s[i-1]!='#'&&s[i-2]!='#')f=0;
    }
    if(f||g)
    {
        Vi ans;
        int cnt=0;
        for(int i=0;i<=n;i++)
        {
            if(s[i]=='#')cnt++;
            else if(cnt)ans.pb(cnt),cnt=0;
        }
        W(SZ(ans));W(ans);
        return;
    }
    for(int i=1;i<=3;i++)
        calc(i);
    W(-1);
}

int main()
{
    srand(time(0));
    int T=1;
    //scanf("%d",&T);
    for(int kase=1;kase<=T;kase++)
    {
        //printf("Case #%d: ",kase);
        solve();
    }
    return 0;
}