#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5;
vector<vector<long long> > ans(N);
void Test() {
  string s;
  cin >> s;
  long long n = s.size(), ptr = 0, len = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '0') {
      ans[ptr++].push_back(i + 1);
      len = max(len, ptr);
    } else {
      if (!ptr) {
        cout << "-1";
        return;
      }
      ans[--ptr].push_back(i + 1);
    }
  }
  long long curlen = ans[ptr].size();
  if (curlen && s[ans[ptr][curlen - 1] - 1] == '1')
    cout << "-1";
  else {
    cout << len << "\n";
    for (long long i = 0; i < len; i++) {
      long long rlen = ans[i].size();
      cout << rlen << " ";
      for (long long j = 0; j < rlen; j++) {
        cout << ans[i][j] << " ";
      }
      cout << "\n";
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << fixed << setprecision(10);
  Test();
  return 0;
}
