#include <bits/stdc++.h>   using namespace std;   void read(int &x) {     x = 0;     int f = 1;     char ch = getchar();     for (; !isdigit(ch); ch = getchar())       if (ch ==  - ) f = -f;     for (; isdigit(ch); ch = getchar()) x = x * 10 + ch -  0 ;     x *= f;   }   void print(int x) {     if (x < 0) putchar( - ), x = -x;     if (!x) return;     print(x / 10), putchar(x % 10 + 48);   }   void write(int x) {     if (!x)       putchar( 0 );     else       print(x);     putchar(  n );   }   const int maxn = 1e6 + 10;   const int inf = 1e9;   const double eps = 1e-8;   const int mod = 1e9 + 7;   char s[maxn];   vector<vector<int> > v;   stack<int> a, b;   int n;   int main() {     scanf( %s , s + 1);     n = strlen(s + 1);     for (int i = 1; i <= n; i++)       if (s[i] ==  1 ) {         if (a.empty()) return puts( -1 ), 0;         int x = a.top();         a.pop();         v[x].push_back(i);         b.push(x);       } else {         if (b.empty())           v.push_back(vector<int>{i}), a.push(v.size() - 1);         else {           int x = b.top();           b.pop();           v[x].push_back(i);           a.push(x);         }       }     if (b.size()) return puts( -1 ), 0;     write(v.size());     for (auto x : v) {       printf( %d  , x.size());       for (auto a : x) printf( %d  , a);       puts(  );     }     return 0;   }   