#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int t = s.size();
  vector<int> v(t), MAX(t);
  bool end = false;
  int d = 0;
  int last = 0;
  for (int i = 0; i < t; ++i) {
    if (s[i] == '#') last = i + 1;
    if (s[i] == '(')
      ++d;
    else
      --d;
    v[i] = d;
    if (d == -1) {
      end = true;
      break;
    }
  }
  int sum = 0;
  for (int i = t - 1; i >= last; --i) {
    if (sum < 0) {
      end = true;
      break;
    }
    if (s[i] == ')')
      ++sum;
    else
      --sum;
  }
  if (end or sum < 0) {
    cout << -1 << endl;
    return 0;
  }
  MAX[t - 1] = v[t - 1];
  for (int i = t - 2; i > 0; --i) {
    MAX[i] = min(MAX[i + 1], v[i]);
  }
  int m = 0;
  for (int i = 0; i < t; ++i) {
    if (s[i] == '#') cout << MAX[i] + 1 - m << endl, m = MAX[i];
  }
}
