#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 5;
set<int> ones;
set<int> zeros;
int pre[MAX];
int vis[MAX];
vector<int> vec[MAX];
int cnt;
void dfs(int s) {
  vis[s] = 1;
  if (pre[s] != -1) {
    dfs(pre[s]);
  }
  vec[cnt].push_back(s);
}
int main() {
  string s;
  cin >> s;
  memset(pre, -1, sizeof pre);
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '0') {
      if (ones.size()) {
        int x = *(ones.begin());
        ones.erase(ones.begin());
        pre[i] = x;
        zeros.insert(i);
      } else {
        zeros.insert(i);
      }
    } else {
      if (zeros.size()) {
        int x = *(zeros.begin());
        zeros.erase(zeros.begin());
        pre[i] = x;
        ones.insert(i);
      } else {
        printf("-1\n");
        return 0;
      }
    }
  }
  if (ones.size()) {
    printf("-1\n");
    return 0;
  }
  for (int i = s.length() - 1; i >= 0; i--) {
    if (!vis[i]) {
      dfs(i);
      cnt++;
    }
  }
  printf("%d\n", cnt);
  for (int i = 0; i < cnt; i++) {
    printf("%d ", (int)vec[i].size());
    for (int j = 0; j < vec[i].size(); j++) {
      printf("%d ", vec[i][j] + 1);
    }
    printf("\n");
  }
}
