#include <bits/stdc++.h>
using namespace std;
template <class T1>
void deb(T1 e1) {
  cout << e1 << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
const int mod = 1000000007;
int n;
char str[200000 + 7];
vector<int> ans[2 * 200000 + 7];
queue<int> one;
queue<int> zero;
bool mark[200000 + 7];
int main() {
  int id, i, j, k;
  scanf("%s", str);
  n = strlen(str);
  bool res = 1;
  int cnt = 0;
  for (i = 0; i < n; i++) {
    if (str[i] == '0') {
      if (!one.empty()) {
        id = one.front();
        one.pop();
        ans[id].push_back(i + 1);
        zero.push(id);
      } else {
        ans[cnt].push_back(i + 1);
        zero.push(cnt);
        cnt++;
      }
    } else {
      if (!zero.empty()) {
        id = zero.front();
        zero.pop();
        ans[id].push_back(i + 1);
        one.push(id);
      } else {
        res = 0;
        break;
      }
    }
  }
  if (res == 0 or !one.empty()) {
    printf("-1\n");
  } else {
    printf("%d\n", cnt);
    for (i = 0; i < cnt; i++) {
      printf("%d", ans[i].size());
      for (auto vv : ans[i]) {
        printf(" %d", vv);
      }
      puts("");
    }
  }
  return 0;
}
