#include <bits/stdc++.h>
using namespace std;
long long n = 1, m, x, y, ans, v;
queue<long long> q[200100];
set<long long> zero, one;
string s;
int main() {
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '0') x++;
    if (s[i] == '1') y++;
    if (x < y) return cout << -1, 0;
  }
  x = 0;
  y = 0;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '0') x++;
    if (s[i] == '1') y++;
    if (x < y) return cout << -1, 0;
  }
  q[0].push(0);
  one.insert(0);
  for (int i = 1; i < s.size(); i++) {
    if (s[i] == '0') {
      if (zero.size() == 0) {
        zero.insert(n);
        n++;
      }
      v = *zero.begin();
      zero.erase(v);
      q[v].push(i);
      one.insert(v);
    } else {
      if (one.size() == 0) {
        one.insert(n);
        n++;
      }
      v = *one.begin();
      one.erase(v);
      q[v].push(i);
      zero.insert(v);
    }
  }
  cout << n << endl;
  for (int i = 0; i < n; i++) {
    cout << q[i].size() << ' ';
    while (!q[i].empty()) {
      cout << q[i].front() + 1 << ' ';
      q[i].pop();
    }
    cout << endl;
  }
  return 0;
}
