#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  long long count = 0;
  long long num;
  long long diff = 0;
  vector<pair<int, int> > v;
  for (long long i = 0; i < s.length(); ++i) {
    if (s[i] == '(') {
      diff++;
    }
    if (s[i] == ')') {
      diff--;
    }
    if (s[i] == '#') {
      v.push_back(make_pair(i, diff - v.size()));
    }
  }
  for (long long i = 0; i < v.size() - 1; ++i) {
    s[v[i].first] = ')';
  }
  string temp = "";
  for (int i = 0; i < (diff - v.size()); ++i) {
    temp = temp + ')';
  }
  s[v[v.size() - 1].first] = ')';
  s.insert(v[v.size() - 1].first + 1, temp);
  long long dif = 0;
  int flag = 0;
  for (long long i = 0; i < s.length(); ++i) {
    if (s[i] == '(') {
      dif++;
    }
    if (s[i] == ')') {
      dif--;
    }
    if (dif < 0) {
      flag = 1;
      break;
    }
  }
  if (diff <= 0) {
    flag = 1;
  } else {
    for (int i = 0; i < v.size(); ++i) {
      if (v[i].second < 1) {
        flag = 1;
        break;
      }
    }
  }
  if (flag == 1) {
    cout << -1 << endl;
  } else {
    for (int i = 0; i < v.size() - 1; ++i) {
      cout << 1 << endl;
    }
    cout << (diff - v.size() + 1) << endl;
  }
}
