#include <bits/stdc++.h>
using namespace std;
int n, tot;
char s[200010];
queue<int> Q0, Q1;
vector<int> V[200010];
void work() {
  scanf("%s", s + 1), n = strlen(s + 1);
  for (int i = 1, x; i <= n; i++)
    if (s[i] == '1') {
      if (Q0.empty()) puts("-1"), exit(0);
      x = Q0.front(), Q0.pop(), V[x].push_back(i), Q1.push(x);
    } else {
      if (Q1.empty())
        x = ++tot;
      else
        x = Q1.front(), Q1.pop();
      V[x].push_back(i), Q0.push(x);
    }
  if (!Q1.empty()) puts("-1"), exit(0);
  printf("%d\n", tot);
  for (int i = 1; i <= tot; i++) {
    printf("%d", V[i].size());
    for (int j = 0; j < V[i].size(); j++) printf(" %d", V[i][j]);
    puts("");
  }
}
int main() {
  work();
  return 0;
}
