#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > ans;
vector<int> g[2];
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cin.exceptions(cin.failbit);
  string s;
  cin >> s;
  bool f = false;
  for (int i = 0; i < ((int)(s).size()); ++i) {
    int x = s[i] - '0';
    if ((int)(g[1 - x]).size()) {
      int y = g[1 - x].back();
      g[1 - x].pop_back();
      ans[y].push_back(i + 1);
      g[x].push_back(y);
    } else if (x == 0) {
      vector<int> t;
      t.push_back(i + 1);
      int y = (int)(ans).size();
      ans.push_back(t);
      g[0].push_back(y);
    } else {
      f = true;
      break;
    }
  }
  if (f || (int)(g[1]).size())
    cout << -1;
  else {
    cout << (int)(ans).size() << '\n';
    for (auto& v : ans) {
      cout << (int)(v).size() << ' ';
      for (auto& i : v) cout << i << ' ';
      cout << '\n';
    }
  }
  return 0;
}
