#include <bits/stdc++.h>
using namespace std;
const int maxsize = 2e5 + 10;
string s;
int cnt;
vector<int> p[maxsize];
int len;
int main(void) {
  cin >> s;
  cnt = 0;
  len = -1;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '0') {
      p[++cnt].push_back(i + 1);
    } else {
      if (cnt == 0) {
        puts("-1");
        return 0;
      }
      p[cnt--].push_back(i + 1);
    }
    len = max(len, cnt);
  }
  if (len != cnt) {
    puts("-1");
    return 0;
  }
  printf("%d\n", cnt);
  for (int i = 1; i <= cnt; i++) {
    printf("%d ", p[i].size());
    for (int j = 0; j < p[i].size(); j++) {
      printf("%d ", p[i][j]);
    }
    printf("\n");
  }
  return 0;
}
