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