#include <bits/stdc++.h>
using namespace std;
char Story;
vector<int> Zebra[200010];
int Z = 0;
queue<int> qu0;
queue<int> qu1;
int main() {
  for (int i = 1;; i++) {
    scanf("%c", &Story);
    if (Story == '\n') break;
    if (Story == '0') {
      if (qu1.empty()) {
        Zebra[Z++].push_back(i);
        qu0.push(Z - 1);
      } else {
        Zebra[qu1.front()].push_back(i);
        qu0.push(qu1.front());
        qu1.pop();
      }
    } else if (Story == '1') {
      if (qu0.empty()) {
        cout << "-1";
        return 0;
      } else {
        Zebra[qu0.front()].push_back(i);
        qu1.push(qu0.front());
        qu0.pop();
      }
    }
  }
  if (!qu1.empty()) {
    cout << "-1";
    return 0;
  }
  cout << Z;
  for (int i = 0; i < Z; i++) {
    cout << endl << Zebra[i].size();
    for (vector<int>::iterator it = Zebra[i].begin(); it != Zebra[i].end();
         it++)
      cout << " " << (*it);
  }
}
