#include <bits/stdc++.h>
using namespace std;
int main() {
  string in = "111";
  cin >> in;
  vector<vector<int>> result;
  set<int> last1, last0;
  for (int i = 0; i < in.size(); i++) {
    if (in[i] == '0') {
      if (last1.empty()) {
        result.push_back({i});
        last0.insert(result.size() - 1);
      } else {
        int cur = *last1.begin();
        result[cur].push_back(i);
        last1.erase(cur);
        last0.insert(cur);
      }
    } else {
      if (last0.empty()) {
        cout << -1;
        return 0;
      } else {
        int cur = *last0.begin();
        result[cur].push_back(i);
        last0.erase(cur);
        last1.insert(cur);
      }
    }
  }
  if (last1.size()) {
    cout << -1;
    return 0;
  }
  cout << result.size() << endl;
  for (auto &it : result) {
    cout << it.size() << " ";
    for (auto it2 : it) {
      cout << (it2 + 1) << " ";
    }
    cout << endl;
  }
}
