#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  string str;
  cin >> str;
  n = str.length();
  vector<vector<int>> vec(n);
  stack<int> one, zero;
  int coun = 0;
  for (int i = 0; i < n; i++) {
    if (str[i] == '0') {
      if (one.size()) {
        vec[one.top()].push_back(i + 1);
        zero.push(one.top());
        one.pop();
      } else {
        zero.push(coun);
        vec[coun++].push_back(i + 1);
      }
    } else {
      if (zero.size()) {
        vec[zero.top()].push_back(i + 1);
        one.push(zero.top());
        zero.pop();
      } else {
        cout << "-1";
        return 0;
      }
    }
  }
  if (one.size()) {
    cout << "-1";
    return 0;
  }
  cout << coun << endl;
  for (int i = 0; i < coun; i++) {
    cout << vec[i].size() << " ";
    for (int j = 0; j < vec[i].size(); j++) cout << vec[i][j] << " ";
    cout << endl;
  }
}
