#include <bits/stdc++.h>
using namespace std;
string s;
vector<int> v[200002];
int c, m;
int main() {
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '0')
      v[c++].push_back(i);
    else {
      if (c == 0) {
        cout << -1 << endl;
        return 0;
      }
      v[--c].push_back(i);
    }
    m = max(m, c);
  }
  if (m != c) {
    cout << -1 << endl;
    return 0;
  }
  cout << m << endl;
  for (int i = 0; i < m; i++) {
    cout << v[i].size();
    for (int j = 0; j < v[i].size(); j++) {
      cout << " " << v[i][j] + 1;
    }
    cout << endl;
  }
}
