#include <bits/stdc++.h>
using namespace std;
struct debugger {
  template <typename T>
  debugger& operator,(const T v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
int L[100009], R[100009], H[100009];
int main() {
  ios_base::sync_with_stdio(false);
  int i, j, k, n;
  string str;
  while (cin >> str) {
    str = "1" + str;
    memset(L, 0, sizeof(L));
    memset(R, 0, sizeof(R));
    memset(H, 0, sizeof(H));
    int last, cnt = 0;
    ;
    int val[300] = {0};
    for (i = 1; i < (int)str.size(); i++) {
      val[str[i]]++;
      if (str[i] == '#') last = i;
    }
    int tot = 0;
    vector<int> ans;
    for (i = 1; i < (int)str.size(); i++) {
      if (str[i] == '(') tot++;
      if (str[i] == ')') tot--;
      if (str[i] == '#') {
        if (i != last) {
          ans.push_back(1);
          tot--;
        } else {
          int need = val['('] - val[')'] - (val['#'] - 1);
          tot -= need;
          if (need <= 0) {
            tot = -1;
          }
          ans.push_back(need);
        }
      }
      if (tot < 0) break;
    }
    if (i >= (int)str.size()) {
      for (i = 0; i < ((int)ans.size()); i++) cout << ans[i] << endl;
    } else
      cout << -1 << endl;
  }
}
