#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  map<int, vector<int>> ans;
  bool flag = true;
  int co = 0;
  for (int i = 0; i < s.length(); i++) {
    if (co == 0 && s[i] == '1') {
      flag = false;
      break;
    } else {
      if (s[i] == '0') co++;
      auto it = ans.find(co);
      if (it == ans.end()) {
        ans.insert({co, vector<int>{i + 1}});
      } else {
        it->second.push_back(i + 1);
      }
      if (s[i] == '1') co--;
    }
  }
  if (co != ans.size()) flag = false;
  if (flag) {
    cout << ans.size() << '\n';
    for (auto iii : ans) {
      cout << iii.second.size() << ' ';
      for (auto i : iii.second) {
        cout << i << ' ';
      }
      cout << '\n';
    }
  } else
    cout << -1;
  return 0;
}
