#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j;
  set<int> ed;
  set<int> nol;
  string s;
  cin >> s;
  for (i = 0; i < s.size(); i++) {
    if (s[i] == '1')
      ed.insert(i);
    else
      nol.insert(i);
  }
  int last = 0;
  int nolikov = s.size() - ed.size();
  vector<vector<int>> ans;
  while (!ed.empty()) {
    if (nol.empty()) {
      cout << -1;
      return 0;
    }
    set<int>::const_iterator z = nol.begin();
    vector<int> vegetable;
    i = *z;
    set<int>::iterator low;
    vegetable.push_back(*z + 1);
    int loh = *z;
    nol.erase(z);
    int limit = 2000000;
    while (!ed.empty()) {
      z = ed.lower_bound(loh);
      if (*z < loh) break;
      low = nol.lower_bound(*z);
      if (*low < *z) {
        cout << -1;
        return 0;
      }
      vegetable.push_back(*z + 1);
      vegetable.push_back(*low + 1);
      loh = *low;
      ed.erase(z);
      nol.erase(low);
    }
    ans.push_back(vegetable);
  }
  cout << ans.size() + nol.size() << "\n";
  for (j = 0; j < ans.size(); j++) {
    cout << ans[j].size() << " ";
    for (i = 0; i < ans[j].size(); i++) cout << ans[j][i] << " ";
    cout << "\n";
  }
  for (set<int>::const_iterator z(nol.begin()), end(nol.end()); z != end; ++z) {
    cout << 1 << " " << *z + 1 << "\n";
  }
  return 0;
}
