#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  int ptr = 0;
  int c1 = 0, c2 = 0;
  int te = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '(')
      c1++;
    else if (s[i] == ')') {
      c2++;
      te++;
    } else
      te++;
    if (te > c1) {
      cout << "-1" << endl;
      return 0;
    }
  }
  int f1 = 0, f2 = 0;
  int last;
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == '#') {
      last = i;
      break;
    } else if (s[i] == '(')
      f1++;
    else
      f2++;
  }
  if (f1 > f2) {
    cout << "-1" << endl;
    return 0;
  }
  int count = 0;
  for (int i = 0; i <= last; i++) {
    if (s[i] == '#') {
      if (i != last) {
        v.push_back(1);
        count++;
      } else
        v.push_back((c1 - c2) - count);
    }
  }
  ptr = 0;
  int a1 = 0, a2 = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      a1++;
    else if (s[i] == ')')
      a2++;
    else if (s[i] == '#') {
      a2 += v[ptr];
      ptr++;
    }
    if (a2 > a1) {
      cout << -1 << endl;
      return 0;
    }
  }
  for (int i = 0; i < v.size(); i++) {
    if (i != v.size() - 1)
      cout << v[i] << " ";
    else
      cout << v[i] << endl;
  }
  return 0;
}
