#include <bits/stdc++.h>
using namespace std;
long long int inf = pow(10, 9) + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string second;
  cin >> second;
  long long int n = second.size(), siz = 0, c = 0;
  vector<long long int> v[200001];
  for (long long int i = 0; i < n; ++i) {
    if (second[i] == '0')
      v[++c].push_back(i + 1);
    else if (second[i] == '1') {
      if (c == 0)
        return cout << -1, 0;
      else
        v[c--].push_back(i + 1);
    }
    siz = max(siz, c);
  }
  if (siz != c) return cout << -1, 0;
  cout << siz << "\n";
  for (long long int i = 1; i <= siz; ++i) {
    cout << v[i].size() << " ";
    for (long long int j = 0; j < v[i].size(); ++j) cout << v[i][j] << " ";
    cout << "\n";
  }
  return 0;
}
