#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
const long long int MAXN = 2e5 + 5;
const long long int mod = 1000000007;
const long long int N = 200005;
void solve() {
  string str;
  cin >> str;
  int n = str.size();
  int zero = count(str.begin(), str.end(), '0');
  int one = n - zero;
  if (one >= zero) {
    cout << -1 << "\n";
    return;
  }
  int k = zero - one;
  vector<vector<int>> ans(k, vector<int>());
  int idx = 0;
  set<int> ze, on;
  for (int i = 0; i < n; i++) {
    if (str[i] == '1') {
      if (ze.size() == 0) {
        cout << -1 << "\n";
        return;
      } else {
        ans[*ze.begin()].push_back(i + 1);
        on.insert(*ze.begin());
        ze.erase(ze.begin());
      }
    } else {
      if (on.size() == 0 && idx >= k) {
        cout << -1 << "\n";
        return;
      }
      if (on.size() == 0) {
        ans[idx].push_back(i + 1);
        ze.insert(idx);
        idx += 1;
      } else {
        ans[*on.begin()].push_back(i + 1);
        ze.insert(*on.begin());
        on.erase(on.begin());
      }
    }
  }
  for (int i = 0; i < idx; i++) {
    if (str[ans[i][0] - 1] != '0' || str[(ans[i].back()) - 1] != '0') {
      cout << -1 << "\n";
      return;
    }
  }
  cout << idx << "\n";
  for (int i = 0; i < idx; i++) {
    cout << ans[i].size() << " ";
    for (auto x : ans[i]) {
      cout << x << " ";
    }
    cout << "\n";
  }
  return;
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
