#include <bits/stdc++.h>
using namespace std;
int main() {
  string a;
  cin >> a;
  int n = a.size(), val = 0, pos = 0;
  vector<int> v[300000];
  for (int i = 0; i < n; i++) {
    if (a[i] == '0')
      v[val++].push_back(1 + i);
    else {
      if (val == 0) {
        cout << -1 << endl;
        return 0;
      }
      v[--val].push_back(1 + i);
    }
    pos = max(pos, val);
  }
  if (val != pos) {
    cout << -1 << endl;
    return 0;
  }
  cout << val << endl;
  for (int i = 0; i < val; i++) {
    cout << v[i].size();
    for (int j = 0; j < v[i].size(); j++) cout << " " << v[i][j];
    cout << endl;
  }
}
