#include <bits/stdc++.h>
using namespace std;
vector<vector<pair<int, int> > > ans;
set<int> endof0, endof1;
int main() {
  char s[200005];
  scanf("%s", s);
  for (int i = 0, len = strlen(s); i < len; ++i) {
    if (s[i] == '0') {
      if (endof1.size() != 0) {
        int index = *endof1.begin();
        ans[index].push_back((pair<int, int>){i, 0});
        endof0.insert(index);
        endof1.erase(index);
      } else {
        vector<pair<int, int> > tmp(1);
        tmp[0].first = i;
        tmp[0].second = 0;
        ans.push_back(tmp);
        endof0.insert(ans.size() - 1);
      }
    } else {
      if (endof0.size() != 0) {
        int index = *endof0.begin();
        ans[index].push_back((pair<int, int>){i, 1});
        endof1.insert(index);
        endof0.erase(index);
      } else
        return !printf("-1\n");
    }
  }
  if (endof1.size() != 0) return !printf("-1\n");
  printf("%d\n", ans.size());
  for (int i = 0, len = ans.size(); i < len; ++i) {
    printf("%d ", ans[i].size());
    for (int j = 0, len2 = ans[i].size(); j < len2; ++j) {
      printf("%d ", (ans[i][j]).first + 1);
    }
    putchar(10);
  }
  return 0;
}
