#include <bits/stdc++.h>
using namespace std;
char s[201000];
vector<int> a[201111];
int main() {
  scanf("%s", s);
  int n = strlen(s);
  int k = 0, M = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '0') {
      k++;
      a[k].push_back(i + 1);
      M = max(M, k);
    } else {
      if (k == 0) {
        printf("-1\n");
        return 0;
      }
      a[k].push_back(i + 1);
      k--;
    }
  }
  if (M != k)
    printf("-1\n");
  else {
    printf("%d\n", k);
    for (int i = 1; i <= k; i++) {
      int temp = a[i].size();
      printf("%d", temp);
      for (int j = 0; j < temp; j++) printf(" %d", a[i][j]);
      printf("\n");
    }
  }
  return 0;
}
