#include <bits/stdc++.h>
using namespace std;
const int INF = 2e9;
const double eps = 1e-8;
template <typename T>
inline void read(T &x) {
  x = 0;
  int f = 1;
  char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') {
    f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  x *= f;
}
const int N = 200010;
char s[N];
int i, j, n, p, ans, x;
set<int> ze, on;
vector<int> a[N];
int main() {
  scanf("%s", s);
  n = strlen(s);
  for (i = 0; i < n; i++)
    if (s[i] == '0')
      ze.insert(i);
    else
      on.insert(i);
  while (1) {
    if (!ze.size()) {
      if (on.size()) {
        puts("-1");
        return 0;
      }
      break;
    }
    p = *ze.lower_bound(0);
    ++ans;
    a[ans].push_back(p);
    ze.erase(p);
    if (!on.size()) continue;
    if (on.lower_bound(p) == on.end()) {
      puts("-1");
      return 0;
    }
    x = *on.lower_bound(p);
    while (ze.lower_bound(x) != ze.end()) {
      a[ans].push_back(x);
      on.erase(x);
      p = *ze.lower_bound(x);
      a[ans].push_back(p);
      ze.erase(p);
      if (on.lower_bound(p) == on.end()) break;
      x = *on.lower_bound(p);
    }
  }
  printf("%d\n", ans);
  for (i = 1; i <= ans; i++) {
    int len = a[i].size();
    printf("%d ", len);
    for (j = 0; j < len; j++) printf("%d ", a[i][j] + 1);
    puts("");
  }
}
