#include <bits/stdc++.h>
using namespace std;
long long int INF = 9e18;
long long int mod = 1e9 + 7;
long long int ti = 0;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int te = 1;
  while (te--) {
    string str1;
    cin >> str1;
    long long int n = str1.length(), i, j, t;
    long long int c1 = 0;
    long long int ls;
    for (i = 0; i < n; i++) {
      c1 += (str1[i] == '(');
      if (str1[i] != '(') {
        if (c1 == 0) {
          cout << "-1" << endl;
          return 0;
        }
        if (str1[i] == '#') ls = i;
        c1--;
      }
    }
    if (str1[n - 1] == '(') {
      cout << "-1" << endl;
      return 0;
    }
    long long int c2 = 0;
    vector<long long int> rm;
    for (i = 0; i < n; i++) {
      if (str1[i] == '#') {
        if (i == ls) {
          if (c2 < 1 + c1) {
            cout << "-1" << endl;
            return 0;
          }
          rm.push_back(1 + c1);
        } else {
          rm.push_back(1);
        }
      } else if (str1[i] == '(') {
        c2++;
      } else if (str1[i] == ')') {
        c2--;
      }
    }
    for (i = 0; i < rm.size(); i++) {
      cout << rm[i] << endl;
    }
  }
}
