#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  string S;
  cin >> S;
  int N = (int)S.size();
  queue<int> q1, q2;
  map<int, vector<int>> mp;
  int cur = 0, cur1 = 0;
  for (int i = 0; i < N; i++) {
    if (S[i] == '0') {
      if (q1.empty()) {
        q2.push(cur1);
        mp[cur1].push_back(i + 1);
        cur1++;
      } else {
        cur = q1.front();
        q1.pop();
        mp[cur].push_back(i + 1);
        q2.push(cur);
      }
    } else {
      if (q2.empty()) {
        cout << -1 << "\n";
        return 0;
      } else {
        int cur = q2.front();
        q2.pop();
        mp[cur].push_back(i + 1);
        q1.push(cur);
      }
    }
  }
  if (q1.size()) {
    cout << -1 << "\n";
    return 0;
  }
  cout << cur1 << "\n";
  while (!q2.empty()) {
    cout << mp[q2.front()].size() << " ";
    for (auto x : mp[q2.front()]) cout << x << " ";
    cout << "\n";
    q2.pop();
  }
}
