#include <bits/stdc++.h>
using namespace std;
const int N = 200200;
const int mod = 1e9 + 7;
int su[N];
vector<int> ans[N];
vector<int> en[2];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  int n = s.length();
  for (int i = n - 1; i >= 0; --i) su[i] = su[i + 1] + s[i] == '0';
  int sz = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '0') {
      if (en[1].size()) {
        int x = en[1].back();
        en[1].pop_back();
        ans[x].push_back(i + 1);
        en[0].push_back(x);
      } else {
        ans[sz].push_back(i + 1);
        en[0].push_back(sz++);
      }
    } else {
      if (en[0].size()) {
        int x = en[0].back();
        en[0].pop_back();
        ans[x].push_back(i + 1);
        en[1].push_back(x);
      } else {
        cout << -1;
        return 0;
      }
    }
  }
  if (en[1].size()) return cout << -1, 0;
  cout << sz << '\n';
  for (int i = 0; i < sz; ++i) {
    cout << ans[i].size() << ' ';
    for (int x : ans[i]) cout << x << ' ';
    cout << '\n';
  }
  return 0;
}
