#include <bits/stdc++.h>
using namespace std;
char s[200005];
int n, total = 1, maxi;
vector<int> g[200005];
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (int i = 1; i <= n; ++i) {
    if (s[i] == '0')
      g[total++].push_back(i);
    else
      g[--total].push_back(i);
    if (total <= 0) {
      puts("-1");
      return 0;
    }
    maxi = max(maxi, total);
  }
  if (total != maxi) {
    puts("-1");
    return 0;
  }
  printf("%d\n", total - 1);
  for (int i = 1; i <= total - 1; ++i) {
    printf("%d ", g[i].size());
    for (int j = 0; j < g[i].size(); ++j) printf("%d ", g[i][j]);
    puts("");
  }
}
