#include <bits/stdc++.h>
using namespace std;
long long read() {
  char c = getchar();
  bool flag = 0;
  long long x = 0;
  while (c < '0' || c > '9') {
    if (c == '-') flag = 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3) + (x << 1) + c - '0';
    c = getchar();
  }
  return flag ? -x : x;
}
const long long N = 2e5 + 10;
char s[N];
vector<long long> p[N];
set<long long> mrk[2];
int main() {
  scanf("%s", s + 1);
  long long len = strlen(s + 1), top = 0;
  for (long long i = 1; i <= len; i++) {
    if (s[i] == '0') {
      if (!mrk[1].size()) {
        p[++top].push_back(i);
        mrk[0].insert(top);
      } else {
        p[*(mrk[1].begin())].push_back(i);
        mrk[0].insert(*(mrk[1].begin()));
        mrk[1].erase(mrk[1].begin());
      }
    } else {
      if (!mrk[0].size()) {
        printf("-1\n");
        return 0;
      } else {
        p[*(mrk[0].begin())].push_back(i);
        mrk[1].insert(*(mrk[0].begin()));
        mrk[0].erase(mrk[0].begin());
      }
    }
  }
  if (mrk[1].size())
    printf("-1\n");
  else {
    printf("%lld\n", top);
    for (long long i = 1; i <= top; i++) {
      printf("%lld ", p[i].size());
      for (long long j = 0; j < p[i].size(); j++) printf("%lld ", p[i][j]);
      printf("\n");
    }
  }
}
