#include <bits/stdc++.h>
using namespace std;
const int N = 10005;
void solve() {
  string s;
  cin >> s;
  int n = s.size();
  s = 'a' + s;
  set<int> one, zero;
  vector<int> ans[n];
  for (int i = 0; i < n; i++) zero.insert(i);
  for (int i = 1; i <= n; i++) {
    if (s[i] == '0') {
      if (zero.size() == 0) {
        cout << -1;
        return;
      } else {
        auto it = zero.begin();
        int val = *it;
        ans[val].push_back(i);
        zero.erase(it);
        one.insert(val);
      }
    } else {
      if (one.size() == 0) {
        cout << -1;
        return;
      } else {
        auto it = one.begin();
        int val = *it;
        ans[val].push_back(i);
        one.erase(it);
        zero.insert(val);
      }
    }
  }
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (ans[i].size() == 0) break;
    if (s[ans[i][ans[i].size() - 1]] == '1') {
      cout << "-1";
      return;
    }
    cnt++;
  }
  cout << cnt << "\n";
  for (int i = 0; i < cnt; i++) {
    cout << ans[i].size() << " ";
    for (auto X : ans[i]) cout << X << " ";
    cout << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  srand(time(NULL));
  ;
  int t = 1;
  while (t--) {
    solve();
  }
}
