#include <bits/stdc++.h>
using namespace std;
vector<int> S[200000], A, B;
int main() {
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '1') {
      if (A.size() == 0) {
        cout << -1;
        return 0;
      } else {
        B.push_back(A.back());
        S[A.back()].push_back(i);
        A.pop_back();
      }
    } else {
      if (B.size() == 0) {
        S[i].push_back(i);
        A.push_back(i);
      } else {
        A.push_back(B.back());
        S[B.back()].push_back(i);
        B.pop_back();
      }
    }
  }
  if (B.size() != 0) {
    cout << -1;
    return 0;
  }
  cout << A.size() << "\n";
  for (int i = 0; i < A.size(); i++) {
    cout << S[A[i]].size() << " ";
    for (int y = 0; y < S[A[i]].size(); y++) {
      cout << S[A[i]][y] + 1 << " ";
    }
    cout << "\n";
  }
  return 0;
}
