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