#include <bits/stdc++.h>
using namespace std;
long long inf = (long long)1e18;
long long mod = 1e9 + 7;
long long max1 = (long long)1e9;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long i, j, k, n, m, ct = 0, t;
  string str;
  vector<long long> vect0, vect1;
  cin >> str;
  long long flag = 0;
  set<long long> dict0, dict1;
  for (i = 0; i < str.size(); i++) {
    if (str[i] == '0')
      dict0.insert(i + 1);
    else if (str[i] == '1')
      dict1.insert(i + 1);
  }
  vector<vector<long long>> vect;
  while (flag == 0) {
    long long last = 0;
    vector<long long> temp;
    auto it = dict0.begin();
    if (it == dict0.end()) break;
    i = *it;
    temp.push_back(i);
    dict0.erase(it);
    long long flag2 = 0;
    while (flag2 == 0) {
      if (last == 0) {
        auto kt = dict1.upper_bound(i);
        if (kt == dict1.end()) break;
        i = *kt;
        it = dict0.upper_bound(i);
        if (it == dict0.end()) break;
        temp.push_back(*kt);
        dict1.erase(kt);
        last = 1;
      } else {
        auto kt = dict0.upper_bound(i);
        if (kt == dict0.end()) break;
        temp.push_back(*kt);
        i = *kt;
        dict0.erase(kt);
        last = 0;
      }
    }
    vect.push_back(temp);
    temp.clear();
  }
  ct = 0;
  for (i = 0; i < vect.size(); i++) {
    ct += vect[i].size();
  }
  if (ct != str.size())
    cout << "-1";
  else {
    cout << vect.size() << endl;
    for (i = 0; i < vect.size(); i++) {
      cout << vect[i].size() << " ";
      for (auto x : vect[i]) cout << x << " ";
      cout << endl;
    }
  }
}
