#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  int numright = 0;
  int numleft = 0;
  int numhash = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(') {
      numleft++;
    } else if (s[i] == ')') {
      numright++;
    }
    if (s[i] == '#') {
      numhash++;
    }
  }
  int re = abs(numleft - numright);
  if (re < numhash) {
    cout << -1 << endl;
  } else {
    vector<int> v;
    vector<int> l(n, 0);
    vector<int> r(n, 0);
    int hash = 0;
    if (s[0] == '(') {
      l[0] = 1;
    } else {
      cout << -1 << endl;
      return 0;
    }
    for (int i = 1; i < n; i++) {
      if (s[i] == '(') {
        l[i] = l[i - 1] + 1;
        r[i] = r[i - 1];
      } else if (s[i] == ')') {
        r[i] = r[i - 1] + 1;
        l[i] = l[i - 1];
      } else {
        hash++;
        if (hash == numhash) {
          int xx = numleft - numright;
          xx -= numhash;
          xx++;
          r[i] = xx + r[i - 1];
          l[i] = l[i - 1];
          v.push_back(xx);
        } else {
          r[i] = r[i - 1] + 1;
          l[i] = l[i - 1];
          v.push_back(1);
        }
      }
    }
    for (int i = 0; i < n; i++) {
      if (l[i] < r[i]) {
        cout << -1 << endl;
        return 0;
      }
    }
    for (int i = 0; i < v.size(); i++) {
      cout << v[i] << endl;
    }
  }
}
