#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200000 + 10;
char buff[MAXN];
set<int> st[2];
vector<int> seq[MAXN];
int cnt;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> (buff + 1);
  for (int i = 1; buff[i] != '\0'; ++i) {
    st[buff[i] - '0'].insert(i);
  }
  while (!st[0].empty()) {
    ++cnt;
    seq[cnt].push_back(*st[0].begin());
    st[0].erase(st[0].begin());
    for (int p = 1;;) {
      auto it = st[p].lower_bound(seq[cnt].back());
      if (it == st[p].end() || *it <= seq[cnt].back()) break;
      seq[cnt].push_back(*it);
      st[p].erase(it);
      p ^= 1;
    }
  }
  for (int i = 1; i <= cnt; ++i) {
    if (buff[seq[i].back()] == '1') {
      cout << "-1\n";
      return 0;
    }
  }
  if (cnt == 0 || !st[1].empty()) {
    cout << "-1\n";
    return 0;
  }
  cout << cnt << '\n';
  for (int i = 1; i <= cnt; ++i) {
    cout << seq[i].size() << ' ';
    for (auto x : seq[i]) cout << x << ' ';
    cout << '\n';
  }
  return 0;
}
