#include <bits/stdc++.h>
using namespace std;
char inp[200005];
int main() {
  bool ok;
  vector<int> ft;
  set<pair<int, int> > zeroes, ones;
  set<pair<int, int> >::iterator it;
  vector<vector<int> > vec;
  scanf("%s", inp);
  if (inp[0] == '1')
    cout << -1 << endl;
  else {
    ft.push_back(0);
    vec.push_back(ft);
    zeroes.insert(make_pair(0, 0));
    ok = true;
    int aux = strlen(inp);
    for (int i = 1; i < aux; i++) {
      if (inp[i] == '0') {
        if (ones.empty()) {
          ft.clear();
          ft.push_back(i);
          vec.push_back(ft);
          zeroes.insert(make_pair(i, vec.size() - 1));
        } else {
          it = ones.begin();
          int q = it->second;
          vec[q].push_back(i);
          zeroes.insert(make_pair(i, q));
          ones.erase(it);
        }
      } else {
        if (zeroes.empty()) {
          ok = false;
          break;
        } else {
          it = zeroes.begin();
          int q = it->second;
          vec[q].push_back(i);
          ones.insert(make_pair(i, q));
          zeroes.erase(it);
        }
      }
    }
    if (!ones.empty()) ok = false;
    if (!ok)
      cout << -1 << endl;
    else {
      cout << vec.size() << endl;
      for (int i = 0; i < vec.size(); i++) {
        cout << vec[i].size();
        for (int j = 0; j < vec[i].size(); j++) cout << " " << vec[i][j] + 1;
        cout << endl;
      }
    }
  }
  return 0;
}
