#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> v;
  string s;
  cin >> s;
  int n = s.length(), x = 0, a = 0, ind;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      x++;
    else if (s[i] == ')')
      x--;
    else {
      x--;
      ind = i;
      v.push_back(1);
    }
  }
  if (x < 0) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      a++;
    else
      a--;
    if (i == ind) a -= x;
    if (a < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  n = v.size();
  for (int i = 1; i < n; i++) {
    cout << v[i] << endl;
  }
  cout << x + 1 << endl;
  return 0;
}
