#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  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 0;
      } 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 0;
  }
}
