#include <bits/stdc++.h>
using namespace std;
int q1[200010], q2[200010];
char s[200010];
vector<int> ans[200010];
int main() {
  int t1, t2, k, p, i, j, len;
  scanf("%s", s + 1);
  len = strlen(s + 1);
  t1 = 0;
  t2 = 0;
  k = 0;
  p = 1;
  for (i = 1; i <= len; ++i) {
    if (s[i] == '0') {
      if (t2 <= 0) {
        q1[++t1] = ++k;
        ans[k].push_back(i);
      } else {
        q1[++t1] = q2[t2--];
        ans[q1[t1]].push_back(i);
      }
    } else {
      if (t1 <= 0) {
        p = 0;
        break;
      } else {
        q2[++t2] = q1[t1--];
        ans[q2[t2]].push_back(i);
      }
    }
  }
  if (!p || t2 > 0)
    puts("-1");
  else {
    printf("%d\n", k);
    for (i = 1; i <= k; ++i) {
      int sz = ans[i].size();
      printf("%d ", sz);
      for (j = 0; j < sz - 1; ++j) {
        printf("%d ", ans[i][j]);
      }
      printf("%d\n", ans[i][sz - 1]);
    }
  }
  return 0;
}
