#include <bits/stdc++.h>
using namespace std;
char inp[200005];
int main() {
  bool ok;
  queue<int> zeroes, ones;
  vector<int> vec[200005];
  int n_vec = 0, n_z = 0, n_o = 0, tam;
  scanf("%s", inp);
  tam = strlen(inp);
  if (inp[0] == '1')
    cout << -1 << endl;
  else {
    vec[n_vec++].push_back(0);
    zeroes.push(0);
    n_z++;
    ok = true;
    for (int i = 1; i < tam; i++) {
      if (inp[i] == '0') {
        if (n_o == 0) {
          vec[n_vec++].push_back(i);
          zeroes.push(n_vec - 1);
          n_z++;
        } else {
          int q = ones.front();
          vec[q].push_back(i);
          zeroes.push(q);
          n_z++;
          ones.pop();
          n_o--;
        }
      } else {
        if (n_z == 0) {
          ok = false;
          break;
        } else {
          int q = zeroes.front();
          vec[q].push_back(i);
          ones.push(q);
          n_o++;
          zeroes.pop();
          n_z--;
        }
      }
    }
    if (n_o != 0) ok = false;
    if (!ok)
      printf("-1\n");
    else {
      printf("%d\n", n_vec);
      vector<int>::iterator vit;
      for (int i = 0; i < n_vec; i++) {
        printf("%d", vec[i].size());
        vit = vec[i].begin();
        while (vit != vec[i].end()) {
          printf(" %d", (*vit) + 1);
          vit++;
        }
        printf("\n");
      }
    }
  }
  return 0;
}
