#include <bits/stdc++.h>
using namespace std;
set<int> open, close;
int ans[1000001];
vector<int> store[1000001];
int main() {
  ios::sync_with_stdio(false);
  ;
  cin.tie(0);
  ;
  int i, j, l, x, y, ctr = 0;
  string s;
  cin >> s;
  l = s.length();
  for (i = 0; i < l; i++) {
    if (s[i] == '0') {
      if (open.size()) {
        x = *(open.begin());
        ans[i] = ans[x];
        open.erase(open.begin());
        close.insert(i);
      } else {
        ctr++;
        ans[i] = ctr;
        close.insert(i);
      }
    } else {
      if (!close.size()) {
        cout << "-1";
        return 0;
      }
      x = *(close.begin());
      ans[i] = ans[x];
      close.erase(close.begin());
      open.insert(i);
    }
  }
  if (open.size()) {
    cout << "-1";
    return 0;
  }
  cout << ctr << "\n";
  for (i = 0; i < l; i++) store[ans[i]].push_back(i + 1);
  for (i = 1; i <= ctr; i++) {
    cout << store[i].size() << " ";
    for (auto it : store[i]) cout << it << " ";
    cout << "\n";
  }
  return 0;
}
