#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); };
int main() {
  string s;
  cin >> s;
  vector<vector<int> > a;
  stack<int> last0, last1;
  char last = '1';
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '0' && last1.size() == 0) {
      vector<int> b;
      b.push_back(i + 1);
      a.push_back(b);
      last0.push(a.size() - 1);
    } else if (s[i] == '0') {
      a[last1.top()].push_back(i + 1);
      last0.push(last1.top());
      last1.pop();
    } else if (s[i] == '1' && last0.size() == 0) {
      cout << -1 << endl;
      return 0;
    } else if (s[i] == '1') {
      a[last0.top()].push_back(i + 1);
      last1.push(last0.top());
      last0.pop();
    }
  }
  if (last1.size() > 0) {
    cout << -1 << endl;
    return 0;
  }
  cout << a.size() << endl;
  for (auto x : a) {
    cout << x.size();
    for (auto y : x) {
      cout << ' ' << y;
    }
    cout << endl;
  }
}
