#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  set<int> pos0, pos1;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == '0')
      pos0.insert(i);
    else
      pos1.insert(i);
  }
  vector<vector<int> > ans;
  bool flag = false;
  while (true) {
    if (flag) break;
    if (pos0.size() == 0) {
      if (pos1.size() != 0) flag = true;
      break;
    }
    if (pos1.size() == 0) {
      while (pos0.size() > 0) {
        ans.push_back({*pos0.begin()});
        pos0.erase(*pos0.begin());
      }
      break;
    }
    int a0 = *pos0.begin(), a1 = *pos1.begin();
    if (a0 > a1) flag = true;
    pos0.erase(a0), pos1.erase(a1);
    vector<int> aux = {a0, a1};
    int cur1 = a1;
    while (true) {
      auto it = pos0.upper_bound(cur1);
      if (it == pos0.end()) {
        flag = true;
        break;
      }
      int k1 = *it, k2;
      aux.push_back(k1);
      pos0.erase(k1);
      auto it2 = pos1.upper_bound(k1);
      if (it2 == pos1.end()) break;
      k2 = *it2;
      aux.push_back(k2);
      cur1 = k2;
      pos1.erase(k2);
    }
    ans.push_back(aux);
  }
  if (flag) {
    cout << "-1\n";
    return 0;
  }
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); ++i) {
    cout << ans[i].size();
    for (int j = 0; j < ans[i].size(); ++j) {
      cout << " " << ans[i][j] + 1;
    }
    cout << "\n";
  }
  return 0;
}
