#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX - 1;
const int N = 1000005;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  vector<int> G(n + 1, -1);
  vector<int> vis(n + 1, 0);
  stack<int> ones;
  stack<int> zeros;
  bool flag = true;
  for (int i = 0; i < n; i++) {
    if (s[i] == '0') {
      if (ones.empty()) {
        zeros.push(i + 1);
      } else {
        int u = ones.top();
        ones.pop();
        G[u] = i + 1;
        zeros.push(i + 1);
      }
    } else {
      if (zeros.empty()) {
        flag = false;
        break;
      } else {
        int u = zeros.top();
        zeros.pop();
        G[u] = i + 1;
        ones.push(i + 1);
      }
    }
  }
  if (flag == false || !ones.empty()) {
    cout << -1 << "\n";
    return 0;
  }
  vector<vector<int> > ans;
  for (int i = 1; i <= n; i++) {
    if (vis[i]) continue;
    vis[i] = 1;
    vector<int> tmp;
    tmp.push_back(i);
    ans.push_back(tmp);
    int ind = ans.size() - 1;
    int st = G[i];
    while (1) {
      if (st == -1) break;
      vis[st] = 1;
      ans[ind].push_back(st);
      st = G[st];
    }
  }
  int sz = ans.size();
  cout << sz << "\n";
  for (int i = 0; i < sz; i++) {
    int sz2 = ans[i].size();
    cout << sz2 << " ";
    for (int j = 0; j < sz2; j++) {
      cout << ans[i][j] << " ";
    }
    cout << "\n";
  }
}
