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