#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  int i, j, k;
  vector<int> adj[200010];
  int cnt = 0;
  int flag = 1;
  queue<int> zero, one;
  for (i = 0; i < s.length(); i++) {
    if (s[i] == '0') {
      if (one.size() > 0) {
        int temp = one.front();
        one.pop();
        adj[temp].push_back(i + 1);
        zero.push(temp);
      } else {
        cnt++;
        adj[cnt].push_back(i + 1);
        zero.push(cnt);
      }
    } else {
      if (zero.size() > 0) {
        int temp = zero.front();
        zero.pop();
        adj[temp].push_back(i + 1);
        one.push(temp);
      } else {
        flag = 0;
        break;
      }
    }
  }
  if (flag == 0) {
    cout << "-1\n";
    return 0;
  }
  if (one.size() > 0) {
    cout << "-1\n";
    return 0;
  } else {
    cout << cnt << "\n";
    for (i = 1; i <= cnt; i++) {
      cout << adj[i].size() << " ";
      for (j = 0; j < adj[i].size(); j++) cout << adj[i][j] << " ";
      cout << "\n";
    }
    return 0;
  }
}
