#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int i, stk = 0, last, to_close, cnt = 0;
  string s;
  cin >> s;
  for (i = 0; i < s.size(); i++) {
    if (s[i] == '(') {
      stk++;
    } else {
      stk--;
    }
    if (s[i] == '#') {
      cnt++;
      last = i;
    }
    if (stk < 0) {
      cout << "-1\n";
      return 0;
    }
  }
  to_close = stk;
  stk = 0;
  for (i = 0; i < s.size(); i++) {
    if (s[i] == '(') {
      stk++;
    } else {
      stk--;
    }
    if (i == last) {
      stk -= to_close;
    }
    if (stk < 0) {
      cout << "-1\n";
      return 0;
    }
  }
  for (i = 0; i < cnt - 1; i++) {
    cout << "1\n";
  }
  cout << to_close + 1 << "\n";
}
