#include <bits/stdc++.h>
using namespace std;
int input() {
  int f = 1, s = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    s = s * 10 + c - '0';
    c = getchar();
  }
  return s * f;
}
const int N = 200005;
int len, last;
set<int> s;
set<int> t;
set<int>::iterator sit;
set<int>::iterator tit;
vector<int> ans[N];
int sum;
char str[N];
int main() {
  scanf("%s", str + 1);
  len = strlen(str + 1);
  for (int i = 1; i <= len; ++i)
    (str[i] == '0' ? (s.insert(i)) : (t.insert(i)));
  for (; !s.empty();) {
    ++sum;
    sit = s.begin();
    tit = t.begin();
    for (int w;;) {
      w = *sit;
      ans[sum].push_back(w);
      s.erase(sit++);
      tit = t.upper_bound(w);
      if (tit == t.end()) break;
      w = *tit;
      ans[sum].push_back(w);
      t.erase(tit++);
      sit = s.upper_bound(w);
      if (sit == s.end()) return puts("-1"), 0;
    }
  }
  if (!t.empty()) return puts("-1"), 0;
  cout << sum << endl;
  for (int i = 1; i <= sum; ++i) {
    cout << ans[i].size();
    for (int j = 0; j < ans[i].size(); ++j) {
      cout << " " << ans[i][j];
    }
    cout << endl;
  }
  return 0;
}
