#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long a, b, c, d, e, f, i, j, k, m, n, o, x, y;
  string s;
  cin >> s;
  n = s.size();
  long long cnt[n];
  long long ans = 0;
  vector<int> vo, vz;
  for (i = 0; i < n; i++) {
    if (s[i] == '0') {
      if (vo.size() == 0) {
        vz.push_back(++ans);
        cnt[i] = ans;
      } else {
        vz.push_back(vo[vo.size() - 1]);
        cnt[i] = vo[vo.size() - 1];
        vo.pop_back();
      }
    } else {
      if (vz.size() == 0) {
        vo.push_back(++ans);
        cnt[i] = ans;
      } else {
        vo.push_back(vz[vz.size() - 1]);
        cnt[i] = vz[vz.size() - 1];
        vz.pop_back();
      }
    }
  }
  set<int> st[n + 1];
  for (i = 0; i < n; i++) {
    st[cnt[i]].insert(i);
  }
  long long err = 0;
  for (i = 0; i <= n; i++) {
    if (st[i].size() > 0) {
      a = *st[i].begin();
      b = *st[i].rbegin();
      if (s[a] != '0' || s[b] != '0') err++;
    }
  }
  if (err)
    cout << -1 << "\n";
  else {
    cout << ans << "\n";
    for (i = 0; i <= n; i++) {
      if (st[i].size() > 0) {
        cout << st[i].size() << " ";
        for (int j : st[i]) cout << j + 1 << " ";
        cout << "\n";
      }
    }
  }
}
