#include <bits/stdc++.h>
using namespace std;
char st[200010];
priority_queue<int, vector<int>, greater<int> > q, Q;
queue<int> ans[200010];
int main() {
  int n;
  scanf("%s", st + 1);
  int k = 0;
  n = strlen(st + 1);
  for (int i = 1; i <= n; i++) {
    if (st[i] == '0') {
      if (!Q.empty()) {
        ans[Q.top()].push(i);
        q.push(Q.top());
        Q.pop();
      } else {
        ans[++k].push(i);
        q.push(k);
      }
    } else {
      if (!q.empty()) {
        ans[q.top()].push(i);
        Q.push(q.top());
        q.pop();
      } else {
        printf("-1\n");
        return 0;
      }
    }
  }
  if (!Q.empty()) {
    printf("-1\n");
    return 0;
  }
  printf("%d\n", k);
  for (int i = 1; i <= k; i++) {
    printf("%d ", ans[i].size());
    while (!ans[i].empty()) {
      printf("%d ", ans[i].front());
      ans[i].pop();
    }
    printf("\n");
  }
  return 0;
}
