func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAX_N = 1e5 + 5;   char s[MAX_N];   vector<int> v;   int main() {     scanf( %s , s + 1);     int n = strlen(s + 1);     int tot = 0;     for (int i = 1; i <= n; i++) {       if (s[i] ==  ( )         tot++;       else if (s[i] ==  ) )         tot--;     }     if (tot <= 0) {       printf( -1 n );       return 0;     }     int res = 0;     for (int i = 1; i <= n; i++) {       if (s[i] ==  ( )         res++;       else if (s[i] ==  ) )         res--;       else         res--, v.push_back(1), tot--;       if (res < 0) {         printf( -1 n );         return 0;       }     }     if (tot < 0) {       printf( -1 n );       return 0;     }     v[v.size() - 1] += tot;     res = 0;     int pos = -1;     for (int i = n; i; i--) {       if (s[i] ==  # ) {         pos = i;         break;       }     }     for (int i = 1; i <= n; i++) {       if (s[i] ==  ( )         res++;       else if (s[i] ==  ) )         res--;       else {         if (i == pos)           res -= 1 + tot;         else           res--;       }       if (res < 0) {         printf( -1 n );         return 0;       }     }     for (int i = 0; i < v.size(); i++) printf( %d n , v[i]);     return 0;   }   