#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0)->sync_with_stdio(0);
  string s;
  while (cin >> s) {
    vector<int> a[s.size()];
    int k = 0, kt = 1, ans = 0;
    for (int i = 0; i < s.size(); ++i) {
      if (s[i] == '0')
        a[k++].push_back(i + 1);
      else {
        if (k == 0) {
          kt = 0;
          break;
        } else
          a[--k].push_back(i + 1);
      }
      ans = max(ans, k);
    }
    if (kt && ans == k) {
      cout << ans << '\n';
      for (int i = 0; i < ans; ++i) {
        cout << a[i].size();
        for (int j = 0; j < a[i].size(); ++j) {
          cout << ' ' << a[i][j];
        }
        cout << '\n';
      }
    } else
      cout << -1 << '\n';
  }
  return 0;
}
