#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  auto check = [s](const int &i) { return s[i - 1] == '0'; };
  vector<vector<int> *> res[2];
  for (int i = 1; i <= n; i++) {
    auto &c = s[i - 1];
    if (c == '1') {
      if (res[0].empty()) return puts("-1"), 0;
      auto ptr = res[0].back();
      res[0].pop_back();
      (*ptr).push_back(i);
      res[1].push_back(ptr);
    } else {
      if (res[1].size()) {
        auto ptr = res[1].back();
        res[1].pop_back();
        (*ptr).push_back(i);
        res[0].push_back(ptr);
      } else {
        auto ptr = new vector<int>(1, i);
        res[0].push_back(ptr);
      }
    }
  }
  if (res[1].size()) return puts("-1"), 0;
  printf("%d\n", res[0].size());
  for (auto &v : res[0]) {
    printf("%d", v->size());
    for (auto &x : *v) printf(" %d", x);
    puts("");
  }
  return 0;
}
