#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  getline(cin, str);
  vector<vector<int>> zebras;
  stack<int> complete;
  stack<int> incomplete;
  for (size_t i = 0; i < str.size(); ++i) {
    if (str[i] == '0') {
      if (incomplete.empty()) {
        complete.push(zebras.size());
        zebras.push_back({(int)i});
      } else {
        zebras[incomplete.top()].push_back(i);
        complete.push(incomplete.top());
        incomplete.pop();
      }
    } else {
      if (complete.empty()) {
        cout << "-1\n";
        return 0;
      }
      zebras[complete.top()].push_back((int)i);
      incomplete.push(complete.top());
      complete.pop();
    }
  }
  if (!incomplete.empty()) {
    cout << "-1\n";
    return 0;
  }
  cout << zebras.size() << "\n";
  for (const auto &zebra : zebras) {
    cout << zebra.size() << " ";
    for (const auto &pos : zebra) {
      cout << pos + 1 << " ";
    }
    cout << "\n";
  }
  return 0;
}
