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