#include <bits/stdc++.h>
using namespace std;
vector<int> v[200010];
int main() {
  string str;
  cin >> str;
  map<int, int> mp;
  int ln = str.length();
  for (int i = 0; i < ln; i++) {
    if (str[i] == '0') mp[0]++;
  }
  int k = 0;
  queue<int> q, q1;
  for (int i = 0; i < ln; i++) {
    if (str[i] == '0') {
      int t1 = 0;
      if (q1.size() == 0) {
        q.push(k);
        v[k++].push_back(i);
        mp[0]--;
        continue;
      }
      int u = q1.front();
      q1.pop();
      v[u].push_back(i);
      q.push(u);
    } else {
      int t1 = 0;
      if (q.size() == 0) {
        cout << "-1" << endl;
        return 0;
      }
      int u = q.front();
      q.pop();
      if (mp[0] >= 1) {
        v[u].push_back(i);
        mp[0]--;
        t1 = 1;
        q1.push(u);
      }
      if (t1 == 0) {
        cout << "-1" << endl;
        return 0;
      }
    }
  }
  printf("%d\n", k);
  for (int j = 0; j < k; j++) {
    printf("%d ", v[j].size());
    for (int j1 = 0; j1 < v[j].size(); j1++) {
      printf("%d ", v[j][j1] + 1);
    }
    printf("\n");
  }
}
