#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
string s;
set<int> s1, s0;
vector<int> v[N];
int main() {
  cin >> s;
  int k = 1, n = (int)s.length();
  if (s[0] == '1' || s[n - 1] == '1') {
    printf("-1\n");
    return 0;
  }
  s0.insert(k++);
  v[1].push_back(1);
  for (int i = 1; i < n; ++i) {
    if (s[i] == '1') {
      if (s0.empty()) {
        printf("-1\n");
        return 0;
      } else {
        int t = *s0.begin();
        s0.erase(s0.begin());
        v[t].push_back(i + 1);
        s1.insert(t);
      }
    } else {
      if (s1.empty()) {
        int t = k++;
        v[t].push_back(i + 1);
        s0.insert(t);
      } else {
        int t = *s1.begin();
        s1.erase(s1.begin());
        v[t].push_back(i + 1);
        s0.insert(t);
      }
    }
  }
  if (!s1.empty()) {
    printf("-1\n");
  } else {
    cout << s0.size() << "\n";
    for (int i = 1; i <= (int)s0.size(); ++i) {
      cout << v[i].size() << " ";
      for (auto it : v[i]) {
        cout << it << " ";
      }
      printf("\n");
    }
  }
}
