#include <bits/stdc++.h>
using namespace std;
string str;
vector<vector<int>> seqs;
vector<int> zeros, ones;
int main() {
  cin >> str;
  for (int i = 0; i < (str.size()); i++) {
    if (str[i] == '0') {
      if (ones.size()) {
        int id = *ones.rbegin();
        ones.pop_back();
        seqs[id].push_back(i);
        zeros.push_back(id);
      } else {
        zeros.push_back(seqs.size());
        seqs.push_back({i});
      }
    } else {
      if (zeros.size()) {
        int id = *zeros.rbegin();
        zeros.pop_back();
        seqs[id].push_back(i);
        ones.push_back(id);
      } else {
        return puts("-1"), 0;
      }
    }
  }
  if (ones.size()) return puts("-1"), 0;
  printf("%d\n", seqs.size());
  for (auto vec : seqs) {
    printf("%d ", vec.size());
    for (int x : vec) printf("%d ", x + 1);
    puts("");
  }
  return 0;
}
