#include <bits/stdc++.h>
char s[200005];
std::vector<std::vector<int>> ans;
std::vector<int> tails[2];
int n;
int main(int argc, char* argv[]) {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (int i = 1; i <= n; ++i) {
    int d = s[i] - '0';
    if (d == 0) {
      if (tails[1].empty()) {
        ans.emplace_back();
        ans.back().push_back(i);
        tails[0].push_back((int)ans.size() - 1);
      } else {
        ans[tails[1].back()].push_back(i);
        tails[0].push_back(tails[1].back());
        tails[1].pop_back();
      }
    } else {
      if (tails[0].empty()) {
        puts("-1");
        return 0;
      } else {
        ans[tails[0].back()].push_back(i);
        tails[1].push_back(tails[0].back());
        tails[0].pop_back();
      }
    }
  }
  if (!tails[1].empty()) {
    puts("-1");
    return 0;
  }
  printf("%d\n", (int)ans.size());
  for (const auto& seq : ans) {
    printf("%d", (int)seq.size());
    for (int item : seq) printf(" %d", item);
    printf("\n");
  }
  return 0;
}
