func_code_string: #include <bits/stdc++.h>   using namespace std;   void solve() {     string s;     cin >> s;     string final;     long long int id = -1, count = 0, r = 0, l = 0;     for (long long int i = 0; i < (long long int)s.length(); i++) {       if (s[i] ==  # ) {         id = i;         count++;       }       if (s[i] ==  ( ) r++;       if (s[i] ==  ) ) l++;     }     vector<long long int> ans;     for (long long int i = 0; i < (long long int)s.length(); i++) {       if (i == id) {         long long int num = r - l - (count - 1);         if (num <= 0) {           cout << -1 << endl;           return;         }         ans.push_back(num);         while (num--) {           final +=  ) ;         }         i++;       }       if (s[i] ==  ) )         final +=  ) ;       else if (s[i] ==  ( )         final +=  ( ;       if (s[i] ==  # ) {         ans.push_back(1);         final +=  ) ;       }     }     l = 0, r = 0;     for (long long int i = 0; i < (long long int) final.length(); i++) {       if (l > r) {         cout << -1 << endl;         return;       }       if (final[i] ==  ( )         r++;       else         l++;     }     if (l != r) {       cout << -1 << endl;       return;     }     for (long long int i = 0; i < (long long int)ans.size(); i++) {       cout << ans[i] << endl;     }   }   int main() {     long long int t = 1;     for (long long int i = 1; i <= t; i++) {       solve();     }     return 0;   }   