#include <bits/stdc++.h>
using namespace std;
string sss = "0123456789ABCDEF";
void solve(long long CS) {
  long long left = 0, right = 0, i, l, cnt = 0, np = 0, kyta = 0, baki, last;
  vector<long long> v;
  string s;
  cin >> s;
  l = s.size();
  for (i = 0; i < l; i++) {
    if (s[i] == '#') {
      kyta++;
      last = i;
    } else if (s[i] == '(')
      left++;
    else
      right++;
  }
  if (kyta + right > left) {
    puts("-1");
    return;
  }
  baki = left - right - kyta;
  for (i = 0; i < l; i++) {
    if (s[i] == '(') {
      cnt++;
    } else if (s[i] == ')') {
      cnt--;
      if (cnt < 0) np = 1;
    } else if (s[i] == '#') {
      cnt--;
      if (i == last) cnt -= baki;
      if (cnt < 0) np = 1;
    }
  }
  if (cnt != 0) np = 1;
  if (np) {
    puts("-1");
    return;
  }
  for (i = 0; i < l; i++) {
    if (s[i] == '#') {
      if (i == last)
        cout << baki + 1 << endl;
      else
        cout << 1 << endl;
    }
  }
}
int main() {
  long long t, no = 0;
  t = 1;
  while (t--) solve(++no);
}
