#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int a = 0, sh = 0, c = 0;
  int r = 0;
  bool b = false;
  int k, w;
  vector<int> v;
  vector<int> res;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '(') {
      if (b) v.push_back(r);
      r = 0;
      b = false;
      k = i;
      a++;
    } else if (s[i] == '#') {
      if (b) {
        v.push_back(r);
      }
      b = true;
      r = 0;
      w = i;
      sh++;
    } else if (s[i] == ')') {
      c++;
      if (b == true) {
        r++;
      }
    }
  }
  if (w > k) {
    v.push_back(r);
  }
  int m = a - c;
  int tt = a - c - sh;
  if (tt < 0) {
    cout << -1 << endl;
  } else {
    long ttt = tt;
    tt = 0;
    int num = 0;
    bool f = false;
    for (int i = 0; i < s.length(); i++) {
      if (s[i] == ')') {
        tt--;
        if (tt < 0) {
          cout << -1 << endl;
          f = true;
          break;
        }
      } else if (s[i] == '(') {
        tt++;
      } else {
        if (num == sh - 1)
          tt -= (ttt + 1);
        else {
          tt -= 1;
        }
        num++;
        if (tt < 0) {
          cout << -1 << endl;
          f = true;
          break;
        }
      }
    }
    if (f == false) {
      for (int i = 0; i < sh - 1; i++) {
        cout << 1 << endl;
      }
      cout << ttt + 1 << endl;
    }
  }
  return 0;
}
