#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
const long long mod = 1e9 + 7;
const int INF = 1e9;
const double eps = 1e-9;
int n, m;
char s[maxn];
vector<int> vec[maxn];
int main() {
  scanf("%s", s + 1);
  int len = strlen(s + 1);
  int Max = 0;
  int zero = 0;
  for (int i = 1; i <= len; i++) {
    if (s[i] == '0')
      vec[++zero].push_back(i);
    else {
      if (zero == 0) return puts("-1");
      vec[zero--].push_back(i);
    }
    Max = max(Max, zero);
  }
  if (Max != zero) return puts("-1");
  printf("%d\n", Max);
  for (int i = 1; i <= Max; i++) {
    printf("%d", vec[i].size());
    for (int j = 0; j < vec[i].size(); j++) {
      printf(" %d", vec[i][j]);
    }
    puts("");
  }
}
