#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -f;
    c = getchar();
  }
  while (isdigit(c)) x = x * 10 + (c ^ 48), c = getchar();
  return x * f;
}
const int inf = 1e9 + 1e7, N = 2e5 + 1e1;
const long long INF = 1e18 + 1e9;
int q[N][2], c[2], n, k;
string s;
vector<int> a[N];
signed main() {
  cin >> s;
  n = s.length();
  for (int i = 0; i < n; i++) {
    if (s[i] == '1') {
      if (!c[0]) {
        puts("-1");
        return 0;
      } else
        q[++c[1]][1] = q[c[0]--][0], a[q[c[1]][1]].push_back(i);
    } else {
      if (c[1])
        q[++c[0]][0] = q[c[1]--][1], a[q[c[0]][0]].push_back(i);
      else
        q[++c[0]][0] = ++k, a[k].push_back(i);
    }
  }
  if (!c[1]) {
    printf("%d\n", k);
    for (int i = 1; i <= k; i++) {
      printf("%d ", a[i].size());
      for (int j = 0; j < a[i].size(); j++) printf("%d ", a[i][j] + 1);
      puts("");
    }
  } else
    puts("-1");
  return 0;
}
