#include <bits/stdc++.h>
using namespace std;
vector<int> V[200000];
char str[200003];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> (str + 1);
  int pos = 0, m = 0;
  for (int i = 1; str[i]; ++i) {
    if (str[i] == '0') {
      V[pos++].push_back(i);
      m = max(pos, m);
    } else {
      if (pos == 0) {
        cout << -1 << endl;
        return 0;
      }
      V[--pos].push_back(i);
    }
  }
  if (m != pos)
    cout << -1 << endl;
  else {
    cout << m << endl;
    for (int i = 0; i < m; ++i) {
      cout << V[i].size();
      for (auto x : V[i]) cout << ' ' << x;
      cout << '\n';
    }
  }
  return 0;
}
