#include <bits/stdc++.h>
using namespace std;
const int N = 222222;
char s[N];
queue<int> zero, one;
vector<int> ans[N];
int size_ans[N];
int main() {
  scanf("%s", s + 1);
  int n = strlen(s + 1);
  int sz = 0;
  for (int i = 1; i <= n; ++i) {
    if (s[i] == '0') {
      if (one.empty()) {
        ++sz;
        ans[sz].push_back(i);
        ++size_ans[sz];
        zero.push(sz);
      } else {
        int t = one.front();
        one.pop();
        ans[t].push_back(i);
        ++size_ans[t];
        zero.push(t);
      }
    } else {
      if (zero.empty()) {
        puts("-1");
        return 0;
      } else {
        int t = zero.front();
        zero.pop();
        ans[t].push_back(i);
        ++size_ans[t];
        one.push(t);
      }
    }
  }
  if (!one.empty()) {
    puts("-1");
    return 0;
  }
  printf("%d\n", sz);
  for (int i = 1; i <= sz; ++i) {
    printf("%d ", size_ans[i]);
    for (int j = 0; j < size_ans[i]; ++j) {
      printf("%d ", ans[i][j]);
    }
    puts("");
  }
  return 0;
}
