#include <bits/stdc++.h>
using namespace std;
int n, c0, c1, t0, t1, w0, w1, tot, q[2][1000010];
char s[1000010];
vector<int> v[1000010];
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (int i = (1); i <= (n); i++)
    if (s[i] == '0')
      c0++;
    else
      c1++;
  if (c0 < c1) {
    puts("-1");
    return 0;
  }
  t0 = 1;
  w0 = 0;
  t1 = 1;
  w1 = 0;
  for (int i = (1); i <= (n); i++) {
    if (s[i] == '0') {
      if (t1 > w1) {
        v[++tot].push_back(i);
        q[0][++w0] = tot;
      } else {
        int now = q[1][t1];
        v[now].push_back(i);
        q[0][++w0] = now;
        t1++;
      }
    } else {
      if (t0 > w0) {
        puts("-1");
        return 0;
      }
      int now = q[0][t0];
      v[now].push_back(i);
      q[1][++w1] = now;
      t0++;
    }
  }
  for (int i = (1); i <= (tot); i++) {
    int w = (int)v[i].size() - 1;
    if (s[v[i][w]] == '1') {
      puts("-1");
      return 0;
    }
  }
  printf("%d\n", tot);
  for (int i = (1); i <= (tot); i++) {
    printf("%d", (int)v[i].size());
    for (int j = (0); j <= ((int)v[i].size() - 1); j++) printf(" %d", v[i][j]);
    puts("");
  }
  return 0;
}
