#include <bits/stdc++.h>
using namespace std;
long long rr[] = {0, 1, 1, 1, 0, -1, -1, -1};
long long cc[] = {1, 1, 0, -1, -1, -1, 0, 1};
const long long mod = 1e9 + 7;
const long long N = 300050;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long test = 1;
  while (test--) {
    string s;
    cin >> s;
    long long n = s.size();
    set<long long> st[2];
    for (long long i = 0; i < n; i++) {
      st[s[i] - '0'].insert(i);
    }
    vector<vector<long long> > ans;
    while ((long long)st[0].size() != 0) {
      vector<long long> temp;
      long long x = 0, idx = -1;
      while ((long long)st[x].size() > 0) {
        auto it = st[x].lower_bound(idx + 1);
        if (it == st[x].end()) {
          break;
        }
        temp.push_back(*it);
        idx = *it;
        st[x].erase(it);
        x ^= 1;
      }
      if ((long long)temp.size() > 0 && s[temp.back()] == '1') {
        return cout << -1, 0;
      }
      ans.push_back(temp);
    }
    if ((long long)st[1].size() > 0) {
      return cout << -1, 0;
    }
    cout << ans.size() << '\n';
    for (auto vec : ans) {
      cout << vec.size() << ' ';
      for (auto x : vec) {
        cout << x + 1 << ' ';
      }
      cout << '\n';
    }
  }
  return 0;
}
