#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int hash_count = 0;
  int left = 0;
  int last = s.find_last_of('#');
  int last_value = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '#') {
      hash_count++;
      if (i != last)
        s[i] = ')';
      else
        continue;
    }
    left += (s[i] == '(' ? 1 : -1);
  }
  if (left <= 0) {
    cout << "-1" << endl;
    return 0;
  }
  last_value = left;
  string new_s = s.substr(0, last);
  for (int i = 0; i < left; i++) new_s.push_back(')');
  new_s += s.substr(last + 1, s.size() - last - 1);
  left = 0;
  for (int i = 0; i < new_s.size(); i++) {
    left += (new_s[i] == '(' ? 1 : -1);
    if (left < 0) {
      cout << "-1" << endl;
      return 0;
    }
  }
  if (left) {
    cout << "-1" << endl;
    return 0;
  }
  for (int i = 0; i < hash_count - 1; i++) cout << "1" << endl;
  cout << last_value << endl;
  return 0;
}
