#include <bits/stdc++.h>
using namespace std;
class Task {
 public:
  void solve(istream& cin, ostream& cout) {
    string s;
    cin >> s;
    vector<vector<int>> seq;
    vector<int> a, b;
    int n = s.length();
    for (int i = 0; i < n; i++) {
      bool x = s[i] - '0';
      if (x) {
        if (a.empty()) {
          cout << -1 << endl;
          return;
        } else {
          int num = a.back();
          seq[num].push_back(i + 1);
          a.pop_back();
          b.push_back(num);
        }
      } else {
        if (b.empty()) {
          a.push_back(seq.size());
          seq.push_back({i + 1});
        } else {
          int num = b.back();
          seq[num].push_back(i + 1);
          b.pop_back();
          a.push_back(num);
        }
      }
    }
    if (b.empty()) {
      cout << seq.size() << endl;
      for (auto i : seq) {
        cout << i.size() << " ";
        for (auto j : i) cout << j << " ";
        cout << endl;
      }
    } else {
      cout << -1 << endl;
      return;
    }
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  Task solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
