func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAXN = 1.01E6;   vector<int> ans[MAXN];   char C[MAXN];   int A[MAXN];   int B[MAXN];   int n, top1, top2;   int main(void) {     ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);     cin >> (C + 1), n = strlen(C + 1);     for (int i = 1; i <= n; ++i) {       if (C[i] ==  0 ) {         if (top2 == 0)           A[++top1] = i, ans[i].push_back(i);         else {           int nowPos = B[top2--];           ans[nowPos].push_back(i), A[++top1] = nowPos;         }       } else {         if (top1 == 0) return puts( -1 ) * 0;         int nowPos = A[top1--];         ans[nowPos].push_back(i), B[++top2] = nowPos;       }     }     if (top2) return puts( -1 ) * 0;     int o = 0;     cout << top1 <<   n ;     for (int i = 1; i <= top1; ++i) {       int id = A[i];       cout << ans[id].size() <<    ;       for (int a : ans[id]) cout << a <<    ;       cout <<   n ;     }     return 0;   }   