#include <bits/stdc++.h>
using namespace std;
const long long ool = 1e18 + 9;
const int oo = 1e9 + 9, base = 1e9 + 7;
const double eps = 1e-7;
const int N = 2e5 + 6;
int sz;
set<int> st[2];
vector<int> ans[N];
int main() {
  ios_base ::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  string s;
  cin >> s;
  int n = (int)s.size(), bal = 0;
  for (int i = 0; i <= n - 1; ++i) {
    if (s[i] == '0')
      st[0].insert(i);
    else
      st[1].insert(i);
  }
  int sum = 0;
  while ((int)st[0].size()) {
    int pos = *st[0].begin();
    st[0].erase(st[0].begin());
    vector<int> vec;
    while (1) {
      vec.emplace_back(pos);
      int kek = 1 - (s[pos] - '0');
      set<int>::iterator it = st[kek].upper_bound(pos);
      if (it == st[kek].end()) break;
      pos = *it;
      st[kek].erase(it);
    }
    if (s[pos] == '1') {
      cout << "-1\n";
      return 0;
    }
    sum += (int)vec.size();
    ans[++sz] = vec;
  }
  if (sum != n) {
    cout << "-1\n";
    return 0;
  }
  cout << sz << "\n";
  for (int i = 1; i <= sz; ++i) {
    cout << (int)ans[i].size() << " ";
    for (auto it : ans[i]) cout << it + 1 << " ";
    cout << "\n";
  }
  return 0;
}
