#include <bits/stdc++.h>
using namespace std;
char s[200000 + 10];
int nt[200000 + 10];
bool st[200000 + 10];
int n;
int main() {
  scanf("%s", s);
  n = strlen(s);
  memset(st, 0, sizeof(st));
  queue<int> z, az;
  for (int i = 0; i < n; i++) {
    int t;
    if (s[i] == '0') {
      if (az.empty()) {
        nt[i] = 0;
        z.push(i);
        st[i] = true;
      } else {
        t = az.front();
        az.pop();
        nt[t] = i;
        nt[i] = 0;
        z.push(i);
      }
    } else {
      if (z.empty()) {
        printf("-1");
        return 0;
      }
      t = z.front();
      z.pop();
      nt[t] = i;
      nt[i] = 0;
      az.push(i);
    }
  }
  if (!az.empty()) {
    printf("-1");
    return 0;
  }
  printf("%d\n", z.size());
  for (int i = 0; i < n; i++)
    if (st[i]) {
      vector<int> t;
      for (int j = i;;) {
        t.push_back(j);
        j = nt[j];
        if (j == 0) break;
      }
      printf("%d", t.size());
      for (int i = 0; i < t.size(); i++) printf(" %d", t[i] + 1);
      printf("\n");
    }
  return 0;
}
