#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  stack<vector<int>*> almost;
  stack<vector<int>*> complete;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '1') {
      if (complete.empty()) {
        cout << -1 << endl;
        return 0;
      } else {
        vector<int>* a = complete.top();
        a->push_back(i + 1);
        complete.pop();
        almost.push(a);
      }
    } else {
      if (almost.empty()) {
        vector<int>* c = new vector<int>;
        c->push_back(i + 1);
        complete.push(c);
      } else {
        vector<int>* a = almost.top();
        a->push_back(i + 1);
        almost.pop();
        complete.push(a);
      }
    }
  }
  if (!almost.empty()) {
    cout << -1 << endl;
    return 0;
  }
  cout << complete.size() << endl;
  while (!complete.empty()) {
    vector<int>* a = complete.top();
    cout << a->size() << " ";
    for (int i = 0; i < a->size(); i++) {
      cout << a->at(i) << " ";
    }
    cout << endl;
    complete.pop();
  }
}
