#include <bits/stdc++.h>
using namespace std;
int n, m;
int A[200006];
char ch[200006];
set<int> p0, p1;
vector<vector<int>> re;
void solve() {
  scanf("%s", ch + 1);
  n = strlen(ch + 1);
  for (int i = (1), iend = (n); i <= iend; ++i) {
    A[i] = ch[i] - '0';
    if (A[i] == 0)
      p0.insert(i);
    else
      p1.insert(i);
  }
  while (p0.size()) {
    vector<int> ee;
    int t = *p0.begin();
    p0.erase(p0.begin());
    ee.push_back(t);
    while (p1.size()) {
      auto t1 = p1.lower_bound(t);
      auto t0 = p0.lower_bound(*t1);
      if (t1 == p1.end() || t0 == p0.end()) break;
      t = *t0;
      ee.push_back(*t1), ee.push_back(*t0);
      p0.erase(t0), p1.erase(t1);
    }
    re.push_back(ee);
  }
  if (p1.size()) puts("-1"), exit(0);
  cout << re.size() << endl;
  for (auto& t : re) {
    printf("%d ", t.size());
    for (auto& x : t) printf("%d ", x);
    puts("");
  }
}
signed main() { solve(); }
