#include <bits/stdc++.h>
using namespace std;
char s[200005];
int tag[200005];
vector<int> vec[200005];
queue<int> needone, needzero;
int main(void) {
  int i, j, n, m, T, one, t;
  scanf("%s", s);
  while (needone.size()) needone.pop();
  while (needzero.size()) needzero.pop();
  for (i = 0; i < 200005; i++) {
    vec[i].clear();
  }
  m = 0;
  for (i = 0; s[i]; i++) {
    if (s[i] == '0') {
      if (needzero.size()) {
        t = needzero.front();
        needzero.pop();
        vec[t].push_back(i + 1);
        needone.push(t);
      } else {
        vec[m].push_back(i + 1);
        needone.push(m);
        m++;
      }
    } else {
      if (needone.size()) {
        t = needone.front();
        needone.pop();
        vec[t].push_back(i + 1);
        needzero.push(t);
      } else {
        break;
      }
    }
  }
  if (s[i]) {
    printf("-1\n");
  } else {
    if (needzero.size()) {
      printf("-1\n");
    } else {
      printf("%d\n", m);
      for (i = 0; i < m; i++) {
        printf("%d", vec[i].size());
        for (j = 0; j < vec[i].size(); j++) {
          printf(" %d", vec[i][j]);
        }
        printf("\n");
      }
    }
  }
}
