#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 10;
char lx[N];
int vis[N];
vector<int> qx[N];
set<int> A, B;
set<int>::iterator it;
void fail() {
  printf("-1\n");
  exit(0);
}
int main() {
  scanf("%s", lx + 1);
  int len = strlen(lx + 1);
  for (int i = 1; i <= len; ++i) {
    if (lx[i] == '1')
      B.insert(i);
    else
      A.insert(i);
  }
  int ans = 0;
  for (int i = 1; i <= len; ++i) {
    if (vis[i]) continue;
    if (lx[i] == '1') fail();
    ++ans;
    qx[ans].push_back(i);
    int lst = i, kk = 0;
    while (1) {
      if (kk & 1) {
        it = A.upper_bound(lst);
        if (it == A.end()) fail();
        qx[ans].push_back(*it);
        vis[*it] = 1, lst = *it;
        A.erase(it);
      } else {
        it = B.upper_bound(lst);
        if (it == B.end()) break;
        qx[ans].push_back(*it);
        vis[*it] = 1, lst = *it;
        B.erase(it);
      }
      kk++;
    }
  }
  printf("%d\n", ans);
  for (int i = 1; i <= ans; ++i) {
    int l = qx[i].size();
    cout << l << " ";
    for (int j = 0; j <= l - 1; ++j) {
      printf("%d ", qx[i][j]);
    }
    puts("");
  }
  return 0;
}
