#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int l, r, t;
  r = t = l = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == ')') {
      r++;
    }
    if (s[i] == '(') {
      l++;
    }
    if (s[i] == '#') {
      t++;
    }
    if (r + t > l) {
      cout << "-1";
      return 0;
    }
  }
  int cntl = 0, cntr = 0;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '#') {
      break;
    }
    if (s[i] == '(') {
      cntl++;
      if (cntl > cntr) {
        cout << "-1";
        return 0;
      }
    } else {
      cntr++;
    }
  }
  for (int i = 1; i <= t - 1; i++) {
    cout << "1\n";
  }
  cout << l - r - (t - 1);
}
