#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  vector<vector<int>> ans;
  vector<int> zero = {1}, one = {1};
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '0') {
      if (one[0] < one.size()) {
        ans[one[one[0]]].push_back(i + 1);
        zero.push_back(one[one[0]]);
        one[0]++;
      } else {
        zero.push_back(ans.size()), ans.push_back({i + 1});
      }
    } else {
      if (zero[0] < zero.size()) {
        ans[zero[zero[0]]].push_back(i + 1);
        one.push_back(zero[zero[0]]);
        zero[0]++;
      } else {
        cout << -1;
        return 0;
      }
    }
  }
  if (zero.size() - zero[0] != ans.size()) {
    cout << -1;
    return 0;
  }
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i].size() << " ";
    for (int j = 0; j < ans[i].size(); j++) {
      cout << ans[i][j] << " ";
    }
    cout << "\n";
  }
  return 0;
}
