#include <bits/stdc++.h>
using namespace std;
long tmp, n;
bool stop = 0;
vector<long> kt, vt, mp;
vector<vector<long> > kq(200001, vector<long>()), m(2, vector<long>());
void tim(long x, long k) {
  long kk = lower_bound(m[k].begin() + vt[k], m[k].end(), x) - m[k].begin();
  if (kk < m[k].size()) {
    long xx = kk;
    kk = m[k][kk];
    mp[kk] = mp[x];
    kq[mp[kk]].push_back(kk);
    vt[k] = xx + 1;
    kt[kk] = 1;
    return;
  }
  if (k == 0) {
    cout << -1;
    stop = 1;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  string s;
  cin >> s;
  n = s.size();
  mp.assign(n, 0);
  kt.assign(n, 0);
  for (long i = 0; i < n; ++i)
    if (s[i] == '0')
      m[0].push_back(i);
    else
      m[1].push_back(i);
  long tmp = 0;
  vt.assign(2, 0);
  for (long i = 0; i < n; ++i) {
    if (s[i] == '0' && kt[i] == 0) {
      ++tmp;
      mp[i] = tmp;
      kq[tmp].push_back(i);
      tim(i, 1);
    }
    if (s[i] == '0' && kt[i] == 1) tim(i, 1);
    if (s[i] == '1' && kt[i] == 1) tim(i, 0);
    if (stop) return 0;
    if (s[i] == '1' && !kt[i]) {
      cout << "-1";
      return 0;
    }
  }
  cout << tmp << '\n';
  for (long i = 1; i <= tmp; ++i, cout << '\n') {
    cout << kq[i].size() << " ";
    for (long j = 0; j < kq[i].size(); ++j) cout << kq[i][j] + 1 << " ";
  }
}
