#include <bits/stdc++.h>
#define SZ(X) ((int)(X).size())
#define ALL(X) (X).begin(), (X).end()
#define REP(I, N) for (int I = 0; I < (N); ++I)
#define REPP(I, A, B) for (int I = (A); I < (B); ++I)
#define RI(X) scanf("%d", &(X))
#define RII(X, Y) scanf("%d%d", &(X), &(Y))
#define RIII(X, Y, Z) scanf("%d%d%d", &(X), &(Y), &(Z))
#define DRI(X) int X; scanf("%d", &X)
#define DRII(X, Y) int X, Y; scanf("%d%d", &X, &Y)
#define DRIII(X, Y, Z) int X, Y, Z; scanf("%d%d%d", &X, &Y, &Z)
#define RS(X) scanf("%s", (X))
#define CASET int ___T, case_n = 1; scanf("%d ", &___T); while (___T-- > 0)
#define MP make_pair
#define PB push_back
#define MS0(X) memset((X), 0, sizeof((X)))
#define MS1(X) memset((X), -1, sizeof((X)))
#define LEN(X) strlen(X)
#define F first
#define S second
#define RF(x) freopen(x,"r",stdin)
#define WF(x) freopen(x,"w",stdout)
typedef long long LL;
using namespace std;
typedef pair<LL,LL> PLL;
typedef pair<int,int> PII;
const LL MOD = (LL)1e9+7;
const int SIZE = 2e5+5;
const LL INF = 1LL<<60;
const double eps = 1e-4;
const double PI=3.1415926535897932;
 
int n;
string inp;
vector<int> s;
 
bool solve(int x){// how many blank cells to leave at the end!
    vector<int> v = s;
    REP(i,n-x){
        if(!v[i])continue;
        if(i&&s[i-1])continue;
        if(i<x)return false;
        for(int j=i-1;j>=max(i-x-1,0);j--){
            if(v[j])return false;
            if(j>=i-x)v[j]=1;
        }
    }
    /*REP(i,n-x){
        printf("%d",v[i]);
    }puts("");*/
    int c0=0;//number of 0s in a row
    vector<PII> gaps;//gotta fill the gaps man
    REP(i,n-x){
        if(v[i]==0){
            c0++;
        }
        else{
            if(c0){
                gaps.PB({i-c0-(c0==i),i-1});
            }
            c0 = 0;
        }
    }
    if(c0){
        gaps.PB({n-x-c0,n-x});
    }
    for(PII g:gaps){
        int lg = g.S-g.F+1;
        if(lg==2)return 0;//we died :(
        if(lg==1)continue;
        if(lg%2){
            for(int j=g.F+1; j<g.S;j+=2){
                v[j]=1;
            }
        }
        else{
            if(x==1)return 0;//died again
            v[g.F+1]=v[g.F+2] = 1;
            for(int j=g.F+4; j<g.S;j+=2){
                v[j]=1;
            }
        }
    }
    /*REP(i,n-x){
        printf("%d",v[i]);
    }puts("");*/
    vector<int> ans;
    int cl = 0;
    REP(i,n-x){
        if(!v[i]){
            if(cl)ans.PB(cl);
            cl = 0;
        }
        else cl++;
    }
    if(cl)ans.PB(cl);
    printf("%d\n",SZ(ans));
    REP(i,SZ(ans)){
        if(i)printf(" ");
        printf("%d",ans[i]);
    }puts("");
    exit(0);
    return 0;
}
 
int main(){
    cin >> inp;
    n = SZ(inp);
    REP(i,n){
        s.PB(inp[i]=='#');
    }
    if (s[0] && s.back()){
        bool full = 1;
        REP(i,n-1){
            if(!s[i]&&!s[i+1]){
                full = 0;
            }
        }
        vector<int> ans;
        int cl = 0;
        REP(i,n){
            if(!s[i]){
                if(cl)ans.PB(cl);
                cl = 0;
            }
            else cl++;
        }
        if(cl)ans.PB(cl);
        if(full){
            printf("%d\n",SZ(ans));
            REP(i,SZ(ans)){
                if(i)printf(" ");
                printf("%d",ans[i]);
            }
            return 0;
        }
        else{
            puts("-1");return 0;
        }
    }
    if(n>=1&&s[n-1]==0)solve(1);
    if(n>=2&&s[n-1]==0&&s[n-2]==0)solve(2);
    if(n>=3&&s[n-1]==0&&s[n-2]==0&&s[n-3]==0)solve(3);
    puts("-1");
}
