#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  string s;
  cin >> s;
  n = (long long)s.size();
  vector<long long> a(n);
  for (long long i = 0; i < n; ++i) a[i] = s[i] - '0';
  vector<long long> idx(n);
  long long cur = 0, mx = 0;
  idx[0] = cur;
  for (long long i = 1; i < n; ++i)
    if (a[i] != a[i - 1])
      idx[i] = cur;
    else if (a[i] == 1) {
      idx[i] = --cur;
      if (cur < 0) {
        cout << -1;
        return 0;
      }
    } else
      idx[i] = ++cur, mx = max(mx, cur);
  vector<vector<long long>> ans(mx + 1);
  for (long long i = 0; i < n; ++i) ans[idx[i]].push_back(i);
  for (long long i = 0; i < mx + 1; ++i)
    if (a[ans[i].front()] != 0 || a[ans[i].back()] != 0) {
      cout << -1;
      return 0;
    }
  cout << mx + 1 << '\n';
  for (long long i = 0; i < mx + 1; ++i) {
    cout << (long long)ans[i].size() << ' ';
    for (long long it : ans[i]) cout << it + 1 << ' ';
    cout << '\n';
  }
  return 0;
}
