#include <bits/stdc++.h>
using namespace std;
list<int> rez[200005];
list<int> a, b;
int i, j, n, m, mas[200005], p[200005], k, aa, r;
string s;
char c;
int main() {
  std::cin.sync_with_stdio(false);
  std::cin.tie(0);
  cin >> s;
  n = s.length();
  i = 0;
  while (i < n) {
    c = s[i];
    if (c == 49) {
      mas[i] = 1;
    }
    i++;
  }
  i = 0;
  k = 0;
  while (i < n && aa == 0) {
    if (mas[i] == 0) {
      if (b.size() == 0) {
        a.push_back(r);
        rez[r].push_back(i);
        r++;
      } else {
        j = b.front();
        b.pop_front();
        rez[j].push_back(i);
        a.push_back(j);
      }
    } else {
      if (a.size() == 0) {
        aa = 1;
      } else {
        j = a.front();
        a.pop_front();
        rez[j].push_back(i);
        b.push_back(j);
      }
    }
    i++;
  }
  if (b.size() > 0) {
    aa = 1;
  }
  if (aa == 1) {
    cout << -1;
  } else {
    cout << r << "\n";
    i = 0;
    while (i < r) {
      cout << rez[i].size() << " ";
      for (int j : rez[i]) {
        cout << j + 1 << " ";
      }
      cout << "\n";
      i++;
    }
  }
  return 0;
}
