#include <bits/stdc++.h>
using namespace std;
struct cww {
  cww() {
    if (1) {
      ios::sync_with_stdio(false);
      cin.tie(0);
    }
  }
} star;
template <typename T>
inline bool chmin(T &l, T r) {
  bool a = l > r;
  if (a) l = r;
  return a;
}
template <typename T>
inline bool chmax(T &l, T r) {
  bool a = l < r;
  if (a) l = r;
  return a;
}
template <typename T>
istream &operator>>(istream &is, vector<T> &v) {
  for (auto &it : v) is >> it;
  return is;
}
class range {
 private:
  struct I {
    int x;
    int operator*() { return x; }
    bool operator!=(I &lhs) { return x < lhs.x; }
    void operator++() { ++x; }
  };
  I i, n;

 public:
  range(int n) : i({0}), n({n}) {}
  range(int i, int n) : i({i}), n({n}) {}
  I &begin() { return i; }
  I &end() { return n; }
};
int main() {
  string s;
  cin >> s;
  int n = s.size();
  vector<vector<int>> sec;
  vector<vector<int>> que(2);
  for (int i : range(n)) {
    if (s[i] == '0') {
      if (que[1].size() > 0) {
        que[0].push_back(que[1].back());
        sec[que[1].back()].push_back(i + 1);
        que[1].pop_back();
      } else {
        que[0].push_back(sec.size());
        sec.push_back({i + 1});
      }
    } else {
      if (que[0].size() > 0) {
        que[1].push_back(que[0].back());
        sec[que[0].back()].push_back(i + 1);
        que[0].pop_back();
      } else {
        cout << -1 << endl;
        return 0;
      }
    }
  }
  if (que[1].size() > 0) {
    cout << -1 << endl;
    return 0;
  } else {
    cout << sec.size() << endl;
    for (auto &s : sec) {
      cout << s.size();
      for (auto &it : s) {
        cout << " " << it;
      }
      cout << endl;
    }
  }
  return 0;
}
