#include <bits/stdc++.h>
const int N = 222222;
const int M = 100000007;
long long Pw(long long a, long long b, long long p) {
  long long v = 1;
  for (; b; b >>= 1, a = a * a % p)
    if (b & 1) v = v * a % p;
  return v;
}
using namespace std;
int n, i, x, id;
char s[N];
vector<int> V0, V1, V[N];
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (i = 1; i <= n; i++) {
    if (s[i] == '0') {
      if (((int)(V1).size())) {
        x = V1.back();
        V0.push_back(V1.back());
        V1.pop_back();
        V[x].push_back(i);
      } else {
        ++id;
        V0.push_back(id);
        V[id].push_back(i);
      }
    } else {
      if (((int)(V0).size())) {
        x = V0.back();
        V1.push_back(x);
        V0.pop_back();
        V[x].push_back(i);
      } else
        return puts("-1"), 0;
    }
  }
  if (((int)(V1).size())) return puts("-1"), 0;
  printf("%d\n", ((int)(V0).size()));
  for (int x : V0) {
    printf("%d", ((int)(V[x]).size()));
    for (int y : V[x]) printf(" %d", y);
    puts("");
  }
}
