#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
char ch[200009];
vector<int> g[200009];
int cnt, ma;
int main() {
  while (~scanf("%s", ch + 1)) {
    for (int i = 0; i < 200005; i++) g[i].clear();
    cnt = ma = 0;
    int flag = 1;
    for (int i = 1; ch[i]; i++) {
      if (ch[i] == '0') {
        g[cnt++].push_back(i);
        ma = max(ma, cnt);
      } else {
        if (cnt == 0) {
          flag = 0;
          break;
        }
        g[--cnt].push_back(i);
      }
    }
    if (cnt != ma) flag = 0;
    if (!flag)
      printf("-1\n");
    else {
      printf("%d\n", cnt);
      for (int i = 0; i < cnt; i++) {
        printf("%d", g[i].size());
        for (int j = 0; j < g[i].size(); j++) printf(" %d", g[i][j]);
        printf("\n");
      }
    }
  }
  return 0;
}
