func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long mod = 1000000007;   int main() {     ios::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     string s;     cin >> s;     int n = s.size();     vector<int> seq(n + 1, 0);     vector<int> ind;     for (int i = 1; i <= n; i++) {       if (s[i - 1] ==  )  || s[i - 1] ==  # ) {         seq[i] = seq[i - 1] - 1;         if (s[i - 1] ==  # ) {           ind.push_back(i - 1);         }       } else {         seq[i] = seq[i - 1] + 1;       }       if (seq[i] < 0) {         cout << -1 << endl;         return 0;       }     }     if (seq[n] == 0) {       for (int i = 0; i < ind.size(); i++) {         cout << 1 << endl;       }     } else {       seq[ind[ind.size() - 1]] -= seq[n];       int val = seq[n];       for (int i = ind[ind.size() - 1] + 1; i <= n; i++) {         if (s[i - 1] ==  )  || s[i - 1] ==  # ) {           seq[i] = seq[i - 1] - 1;         } else {           seq[i] = seq[i - 1] + 1;         }         if (seq[i] < 0) {           cout << -1 << endl;           return 0;         }       }       for (int i = 0; i < (int)ind.size() - 1; i++) {         cout << 1 << endl;       }       cout << 1 + val << endl;     }     return 0;   }   