#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000 + 100;
vector<vector<int> > E(maxn);
char c[maxn];
void process(char *c) {
  int len = strlen(c + 1);
  int s = 0;
  int maxn = -1;
  for (int i = 1; i <= len; ++i) {
    if (c[i] == '0') {
      s++;
      maxn = max(maxn, s);
      E[s].push_back(i);
    } else {
      if (s == 0) {
        cout << "-1" << endl;
        return;
      }
      E[s].push_back(i);
      s--;
    }
  }
  if (s != maxn) {
    cout << "-1" << endl;
    return;
  }
  cout << s << endl;
  for (int i = 1; i <= s; ++i) {
    int t = E[i].size();
    printf("%d", t);
    for (int j = 0; j < t; ++j) printf(" %d", E[i][j]);
    puts("");
  }
}
int main() {
  cin >> (c + 1);
  process(c);
  return 0;
}
