#include <bits/stdc++.h>
using namespace std;
vector<int> g[222222];
int main() {
  string s;
  cin >> s;
  int x = 0, cnt = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '0')
      g[x++].push_back(i);
    else {
      if (x == 0) {
        cout << -1;
        return 0;
      } else
        g[--x].push_back(i);
    }
    cnt = max(cnt, x);
  }
  if (cnt != x) {
    cout << -1;
    return 0;
  }
  cout << cnt << "\n";
  for (int i = 0; i < cnt; i++) {
    cout << g[i].size() << " ";
    for (int j = 0; j < g[i].size(); j++) cout << g[i][j] + 1 << " ";
    cout << "\n";
  }
  return 0;
}
