#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  int d = 0;
  bool ok = true;
  int c = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(')
      d++;
    else if (s[i] == ')')
      d--;
    else {
      c++;
      d--;
    }
    if (d < 0) ok = false;
  }
  int cc = 0;
  int dd = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '#') cc++, dd--;
    if (s[i] == '(') dd++;
    if (s[i] == ')') dd--;
    if (cc == c and s[i] == '#') {
      dd -= d;
    }
    if (dd < 0) ok = false;
  }
  if (not ok)
    cout << -1 << endl;
  else {
    for (int i = 0; i < c - 1; ++i) {
      cout << 1 << endl;
    }
    cout << 1 + d << endl;
  }
}
