#include <bits/stdc++.h>
using namespace std;
const int p = 2e5 + 5;
int n, q[p][2], ea[2], eb[2], to[p], m, an[p];
char s[p];
bool b[p];
bool hs() {
  ea[0] = ea[1] = 1;
  for (int i = 0; i < n; ++i)
    if (s[i] == '0') {
      if (ea[1] > eb[1])
        q[++eb[0]][0] = i;
      else
        to[q[ea[1]++][1]] = i, q[++eb[0]][0] = i;
    } else {
      if (ea[0] > eb[0])
        return false;
      else
        to[q[ea[0]++][0]] = i, q[++eb[1]][1] = i;
    }
  if (ea[1] <= eb[1]) return false;
  return true;
}
int main() {
  scanf("%s", s), n = strlen(s);
  if (!hs()) return !printf("-1");
  for (int i = 0; i < n; ++i)
    if (!to[i]) ++m;
  printf("%d\n", m);
  for (int i = 0; i < n; ++i)
    if (!b[i]) {
      an[m = 1] = i;
      for (int j = to[i]; j; j = to[j]) an[++m] = j, b[j] = true;
      printf("%d ", m);
      for (int j = 1; j <= m; ++j) printf("%d ", an[j] + 1);
      printf("\n");
    }
  return 0;
}
