#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  vector<int> hash_pos;
  vector<int> lparen(s.size()), rparen(s.size());
  lparen[0] = (s[0] == '(');
  rparen[0] = (s[0] == ')');
  if (s[0] == '#') hash_pos.push_back(0);
  bool flag = (s.size() != 1);
  for (int i = 1; i < s.size(); i++) {
    if (s[i] == '(') {
      lparen[i] = lparen[i - 1] + 1;
      rparen[i] = rparen[i - 1];
    } else if (s[i] == ')') {
      lparen[i] = lparen[i - 1];
      rparen[i] = rparen[i - 1] + 1;
    } else {
      lparen[i] = lparen[i - 1];
      rparen[i] = rparen[i - 1];
      hash_pos.push_back(i);
    }
  }
  int last_hash = hash_pos.back();
  for (int i = 1; i < s.size(); i++) {
    if (s[i] == '(') {
      lparen[i] = lparen[i - 1] + 1;
      rparen[i] = rparen[i - 1];
    } else if (s[i] == ')') {
      lparen[i] = lparen[i - 1];
      rparen[i] = rparen[i - 1] + 1;
    } else {
      lparen[i] = lparen[i - 1];
      if (i != last_hash) {
        rparen[i] = rparen[i - 1] + 1;
      } else {
        int k = lparen.back() - rparen.back() - hash_pos.size() + 1;
        if (k == 0) flag = false;
        rparen[i] = rparen[i - 1] + k;
      }
    }
  }
  for (int i = 0; i < s.size(); i++) {
    if (lparen[i] < rparen[i]) {
      flag = false;
      break;
    }
  }
  flag = flag && (lparen.back() == rparen.back());
  if (flag) {
    for (auto x : hash_pos) {
      cout << rparen[x] - rparen[x - 1] << endl;
    }
  } else {
    cout << -1 << endl;
  }
  return 0;
}
