#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  string s;
  cin >> s;
  int n = s.size();
  int t = 0, vt = -1;
  for (int i = 0; i <= n - 1; i++) {
    if (s[i] == '(') t++;
    if (s[i] == ')') t--;
    if (t < 0) {
      cout << -1;
      return 0;
    }
    if (s[i] == '#') vt = i;
  }
  if (t <= 0) {
    cout << -1;
    return 0;
  }
  int kt = 0, t1 = t;
  for (int i = 0; i <= n - 1; i++) {
    if (s[i] == '(') kt++;
    if (s[i] == ')') kt--;
    if (s[i] == '#' && vt != i) {
      t1--;
      kt--;
    }
    if (i == vt) {
      kt -= t1;
    }
    if (kt < 0) {
      cout << -1;
      return 0;
    }
  }
  for (int i = 0; i <= n - 1; i++) {
    if (s[i] == '#' && vt != i) {
      cout << 1 << endl;
      t--;
    }
    if (i == vt) {
      cout << t;
      return 0;
    }
  }
  return 0;
}
