#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  string s;
  cin >> s;
  int unfinished1 = 0;
  int finished0 = 0;
  vector<vector<int> > ans;
  set<int> f0;
  set<int> uf1;
  for (int i = 0; i < (int)s.length(); i++) {
    if (s[i] == '0') {
      if (unfinished1 > 0) {
        unfinished1--;
        finished0++;
        int id = *uf1.begin();
        uf1.erase(uf1.begin());
        ans[id].push_back(i);
        f0.insert(id);
      } else {
        finished0++;
        vector<int> temp;
        temp.push_back(i);
        ans.push_back(temp);
        f0.insert((int)ans.size() - 1);
      }
    } else {
      if (finished0 > 0) {
        finished0--;
        unfinished1++;
        int id = *f0.begin();
        f0.erase(f0.begin());
        ans[id].push_back(i);
        uf1.insert(id);
      } else {
        cout << "-1" << endl;
        exit(0);
      }
    }
  }
  if (unfinished1 > 0) {
    cout << "-1" << endl;
    exit(0);
  }
  cout << ans.size() << endl;
  for (auto x : ans) {
    cout << x.size() << " ";
    for (auto y : x) cout << (y + 1) << " ";
    cout << endl;
  }
}
