#include <bits/stdc++.h>
using namespace std;
int nxt[200010];
bool mk[200010];
int main() {
  string str;
  cin >> str;
  vector<int> v;
  for (auto i : str) v.push_back((int)(i - '0'));
  stack<int> stk, ones;
  int n = v.size();
  for (int i = 0; i < n; ++i) {
    if (v[i] == 1) {
      if (stk.empty()) {
        return puts("-1"), 0;
      } else {
        auto x = stk.top();
        stk.pop();
        nxt[x] = i;
        mk[i] = 1;
        ones.push(i);
      }
    } else {
      stk.push(i);
      if (!ones.empty()) {
        auto x = ones.top();
        ones.pop();
        nxt[x] = i;
        mk[i] = 1;
      }
    }
  }
  if (!ones.empty()) return puts("-1"), 0;
  int k = 0;
  vector<vector<int> > vct;
  vector<int> tmp;
  for (int i = 0; i < n; ++i) {
    if (mk[i]) continue;
    ++k;
    tmp.clear();
    assert(v[i] == 0);
    tmp.push_back(i + 1);
    int j = nxt[i];
    while (j != 0) {
      tmp.push_back(j + 1);
      j = nxt[j];
    }
    vct.push_back(tmp);
  }
  cout << k << endl;
  for (auto i : vct) {
    cout << i.size() << ' ';
    for (auto j : i) cout << j << ' ';
    cout << endl;
  }
}
