#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
char s[maxn];
vector<int> ans[maxn];
int main() {
  scanf("%s", s);
  int l = strlen(s);
  queue<int> a0, a1;
  int flag = 0;
  int cnt = 0;
  for (int i = 0; i < l; i++) {
    if (s[i] == '0') {
      if (a1.empty()) {
        cnt++;
        a0.push(cnt);
        ans[cnt].push_back(i + 1);
      } else {
        int t = a1.front();
        a1.pop();
        a0.push(t);
        ans[t].push_back(i + 1);
      }
    } else {
      if (a0.empty()) {
        printf("-1\n");
        flag = 1;
        break;
      } else {
        int t = a0.front();
        a0.pop();
        a1.push(t);
        ans[t].push_back(i + 1);
      }
    }
  }
  if (flag == 0) {
    if (!a1.empty()) {
      printf("-1\n");
    } else {
      printf("%d\n", cnt);
      for (int i = 1; i <= cnt; i++) {
        printf("%d", ans[i].size());
        for (int j = 0; j < ans[i].size(); j++) {
          printf(" %d", ans[i][j]);
        }
        printf("\n");
      }
    }
  }
  return 0;
}
