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

#define fors(i, a, b) for (int i = (a); i <= (b); i++)
#define _fors(i, a, b) for (int i = (a); i >= (b); i--)
#define pb push_back

vector<int> ans;

string ss;
int n;

bool judge() {
  fors(L, 0, 3) {
    string s = ss;
    if (s.length() < L) continue;
    int ok = 1;
    fors(i, 1, L) {
      char c = s.back();
      //cout << c << endl;
      if (c == '#') ok = 0;
      s.pop_back();
    }
    if (!ok) continue;
    set<int> S, SS;
    int len = s.length();
    fors(i, 0, len - 1) {
      if (!SS.count(i - 1) && s[i] == '#') S.insert(i);
      if (s[i] == '#') SS.insert(i);
    }
    for (auto v : S) {
      if (v - L < 0) { ok = 0; break; }
      fors(i, 1, L) {
        if (s[v - i] == '#') { ok = 0; break; }
        s[v - i] = '#';
      }
      if (v - L - 1 >= 0 && s[v - L - 1] == '#') { ok = 0; break; }
    }
    // cout << ok <<endl;
    if (!ok) continue;
    set<int> ls, rs, lls, rrs;
    fors(i, 0, len - 1) {
      if (!lls.count(i - 1) && s[i] == '#') ls.insert(i);
      if (s[i] == '#') lls.insert(i);
    }
    _fors(i, len - 1, 0) {
      if (!rrs.count(i + 1) && s[i] == '#') rs.insert(i);
      if (s[i] == '#') rrs.insert(i);
    }
    int lef = *ls.begin() - 1, rig = *rs.rbegin() + 1;
    if (L == 0) {
      if (lef != -1 || rig != len) continue;
      auto lit = ls.begin(), rit = rs.begin();
      lit++;
      while (lit != ls.end()) {
        if (*lit - *rit != 2) ok = 0;
        lit++, rit++;
      }
      if (!ok) continue;
      lit = ls.begin(), rit = rs.begin();
      cout << ls.size() << endl;
      while (lit != ls.end()) {
        cout << *rit - *lit + 1 << ' ';
        lit++, rit++;
      }
      cout << endl;
      return true;
    }
    else if (L == 1) {
      vector<int> ans;
      lef++;
      if (lef % 2) continue;
      fors(i, 1, lef / 2) ans.pb(1);
      auto lit = ls.begin(), rit = rs.begin();
      while (lit != ls.end()) {
        ans.pb(*rit - *lit + 1);
        lit++;
        if (lit == ls.end()) break;
        int tl = *lit - *rit - 2;
        if (tl % 2) { ok = 0; break; }
        fors(i, 1, tl / 2) ans.pb(1);
        rit++;
      }
      rig--;
      if ((len - 1 - rig) % 2) continue;
      fors(i, 1, (len - 1 - rig) / 2) ans.pb(1);
      if (!ok) continue;
      cout << ans.size() << endl;
      for (auto v : ans) cout << v << ' ';
      cout << endl;
      return true;
    }
    else {
      vector<int> ans;
      lef++;
      if (lef == 1) continue;
      if (lef % 2 == 0) {
        fors(i, 1, lef / 2) ans.pb(1);
      }
      else {
        ans.pb(2);
        fors(i, 1, (lef - 3) / 2) ans.pb(1);
      }
      /*
      for (auto v : ls) cout << v << ' ';
      cout << endl;
      for (auto v : rs) cout << v << ' ';
      cout << endl;
      */
      auto lit = ls.begin(), rit = rs.begin();
      int ok = 1;
      while (lit != ls.end()) {
        ans.pb(*rit - *lit + 1);
        lit++;
        if (lit == ls.end()) break;
        int tl = *lit - *rit - 2;
        if (tl == 1) { ok = 0; break; }
        if (tl % 2 == 0) {
          fors(i, 1, tl / 2) ans.pb(1);
        }
        else {
          ans.pb(2);
          fors(i, 1, (tl - 3) / 2) ans.pb(1);
        }
        rit++;
      }
      if (!ok) continue;
      rig--;
      if (len - rig - 1 == 1) continue;
      if ((len - rig - 1) % 2 == 0) {
        fors(i, 1, (len - rig - 1) / 2) ans.pb(1);
      }
      else {
        ans.pb(2);
        fors(i, 1, (len - rig - 4) / 2) ans.pb(1);
      }
      cout << ans.size() << endl;
      for (auto v : ans) cout << v << ' ';
      cout << endl;
      return true;
    }
  }
  return false;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> ss;
  n = ss.length();
  int spj = 1;
  for (auto c : ss) if (c == '#') spj = 0;
  if (spj) { cout << 0 << endl << endl; return 0; }
  if (!judge()) cout << -1 << endl;
  return 0;
}

/*
___________#_

*/

