#include <bits/stdc++.h>
using namespace std;
int main() {
  string input;
  cin >> input;
  vector<int> hash_values;
  int count_hash = 0;
  int count_hash1 = 0;
  int diff = 0;
  for (int i = 0; i < input.size(); i++) {
    if (input[i] == '(')
      diff++;
    else if (input[i] == ')')
      diff--;
    else {
      count_hash++;
      count_hash1++;
    }
  }
  if ((diff <= 0) || (abs(diff) < count_hash)) {
    cout << "-1" << endl;
    return 0;
  }
  int update_diff = 0;
  int last = 0;
  for (int i = 0; i < input.size(); i++) {
    if (input[i] == '(')
      update_diff++;
    else if (input[i] == ')')
      update_diff--;
    else if (count_hash > 1) {
      count_hash--;
      update_diff--;
      diff--;
      if (update_diff < 0) {
        cout << "-1" << endl;
        return 0;
      }
    } else {
      int test = 0;
      int till_now = 0;
      for (int j = 0; j < input.size(); j++) {
        if (input[j] == '(')
          test++;
        else if (input[j] == ')')
          test--;
        else {
          till_now++;
          if (till_now == count_hash1) {
            test -= diff;
          } else {
            test--;
          }
        }
        if (test < 0) {
          cout << "-1" << endl;
          return 0;
        }
      }
      break;
    }
  }
  for (int i = 0; i < count_hash1 - 1; i++) {
    cout << 1 << endl;
  }
  cout << diff << endl;
  return 0;
}
