#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
vector<long long> one, zero;
vector<long long> adj[200005];
void solve() {
  long long i, j, k, l, r, m, n, a, b, c, d, x, y, z, t;
  string s;
  cin >> s;
  for (i = 0; i < s.size(); i++) {
    if (s[i] == '0') {
      if (one.size()) {
        adj[one.back()].push_back(i);
        zero.push_back(one.back());
        one.pop_back();
      } else {
        zero.push_back(zero.size() + 1);
        adj[zero.back()].push_back(i);
      }
    } else if (s[i] == '1') {
      if (zero.size()) {
        adj[zero.back()].push_back(i);
        one.push_back(zero.back());
        zero.pop_back();
      } else {
        cout << -1 << endl;
        return;
        one.push_back(one.size() + 1);
        adj[one.back()].push_back(i);
      }
    }
  }
  if (one.size()) {
    cout << -1 << endl;
    return;
  }
  cout << zero.size() << endl;
  for (i = 1; i <= zero.size(); i++) {
    cout << adj[i].size() << ' ';
    for (auto &cv : adj[i]) {
      cout << cv + 1 << ' ';
    }
    cout << endl;
  }
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long t = 1;
  while (t--) solve();
  return 0;
}
