#include <bits/stdc++.h>
using namespace std;
string s;
int n;
int b;
int lp;
string p;
int cnt;
int main() {
  cin >> s;
  n = s.size();
  int lp = n - 1;
  for (int i = 0; i < n; i++)
    if (s[i] == '(')
      b++;
    else if (s[i] == ')')
      b--;
    else if (s[i] == '#')
      cnt++;
  while (s[lp] != '#') {
    lp--;
  }
  int sb = b;
  for (int i = 0; i < n; i++) {
    if (s[i] != '#') {
      p = p + s[i];
    } else {
      if (i != lp) {
        p = p + ')';
        b--;
      } else {
        for (int o = 0; o < max(b, 1); o++) p = p + ')';
        b = 0;
      }
    }
  }
  for (int i = 0; i < p.size(); i++) {
    if (p[i] == '(')
      b++;
    else
      b--;
    if (b < 0) {
      cout << "-1";
      return 0;
    }
  }
  if (b == 0) {
    for (int i = 0; i < cnt - 1; i++) {
      cout << "1" << endl;
      sb--;
    }
    cout << sb;
  } else {
    cout << "-1";
  }
}
