#include <bits/stdc++.h>
using namespace std;
int main(void) {
  char str[200001];
  scanf(" %s", str);
  int n = strlen(str);
  queue<int> one, zero;
  int back[n];
  for (int i = 0; i < n; i++) {
    if (str[i] == '0') {
      if (one.empty()) {
        back[i] = -1;
      } else {
        back[i] = one.front();
        one.pop();
      }
      zero.push(i);
    } else if (str[i] == '1') {
      if (zero.empty()) {
        printf("-1\n");
        return 0;
      }
      back[i] = zero.front();
      zero.pop();
      one.push(i);
    }
  }
  if (!one.empty()) {
    printf("-1\n");
    return 0;
  }
  vector<vector<int> > ans;
  while (!zero.empty()) {
    int v = zero.front();
    zero.pop();
    vector<int> vec;
    while (v >= 0) {
      vec.push_back(v);
      v = back[v];
    }
    ans.push_back(vec);
  }
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) {
    vector<int> vec = ans[i];
    printf("%d", vec.size());
    for (int j = 0; j < vec.size(); j++) {
      printf(" %d", vec[vec.size() - j - 1] + 1);
    }
    puts("");
  }
  return 0;
}
