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