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