#include <bits/stdc++.h>
using namespace std;
const long long MAX = 1e6 + 10;
vector<int> TM[MAX];
int len = 0;
char a[MAX];
stack<int> s1, s0;
int main() {
  cin >> a + 1;
  int len1 = strlen(a + 1);
  for (int j = 1; j <= len1; j++) {
    int flag = 0;
    if (a[j] == '0') {
      if (!s1.empty()) {
        int t = s1.top();
        s1.pop();
        s0.push(t);
        TM[t].push_back(j);
      } else {
        ++len;
        s0.push(len);
        TM[len].push_back(j);
      }
    } else {
      if (s0.empty()) {
        cout << "-1" << endl;
        return 0;
      } else {
        int t = s0.top();
        s0.pop();
        s1.push(t);
        TM[t].push_back(j);
      }
    }
  }
  for (int i = 1; i <= len; i++) {
    if (a[TM[i][TM[i].size() - 1]] == '1') {
      cout << "-1" << endl;
      return 0;
    }
  }
  cout << len << endl;
  for (int i = 1; i <= len; i++) {
    int n = TM[i].size();
    cout << n;
    for (int j = 0; j < n; j++) {
      cout << " " << TM[i][j];
    }
    cout << endl;
  }
  return 0;
}
