#include <bits/stdc++.h>
using namespace std;
char s[233333];
vector<int> rs[233333];
int rn = 0;
vector<int> o, l;
int ma[233333];
int main() {
  scanf("%s", s + 1);
  int n = strlen(s + 1), v = 0;
  for (int i = 1; i <= n; ++i) {
    if (s[i] == '0') {
      if (l.size()) {
        int x = l.back();
        l.pop_back();
        rs[x].push_back(i);
        o.push_back(x);
      } else {
        ++rn;
        rs[rn].push_back(i);
        o.push_back(rn);
      }
    } else {
      if (!o.size()) {
        puts("-1");
        return 0;
      }
      int x = o.back();
      o.pop_back();
      rs[x].push_back(i);
      l.push_back(x);
    }
  }
  if (l.size()) {
    puts("-1");
    return 0;
  }
  printf("%d\n", int(o.size()));
  for (auto w : o) {
    printf("%d ", (int)rs[w].size());
    for (auto x : rs[w]) printf("%d ", x);
    puts("");
  }
}
