#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  int hash_size = 0, one_size = 0, mone_size = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '#') hash_size++;
    if (s[i] == '(') one_size++;
    if (s[i] == ')') mone_size++;
  }
  int value = 0;
  int h = 0;
  vector<int> v;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '(') value++;
    if (s[i] == ')') value--;
    if (s[i] == '#') {
      h++;
      if (h < hash_size) {
        value--;
        v.push_back(1);
      } else {
        int x = one_size - mone_size + 1 - h;
        if (x <= 0) {
          cout << "-1";
          return 0;
        }
        v.push_back(x);
        value -= x;
      }
    }
    if (value < 0) {
      cout << "-1" << endl;
      return 0;
    }
  }
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] << endl;
  }
  return 0;
}
