#include <bits/stdc++.h>
const long long int MOD = 1000000007ll;
const int mxsz = 200005;
using namespace std;
int main() {
  std::ios_base::sync_with_stdio(false);
  string st;
  cin >> st;
  int has = 0, op = 0, cls = 0, ls = 0;
  for (int i = 0; i < st.length(); i++) {
    if (st[i] == '#') {
      ls = i;
    }
  }
  for (int i = 0; i < st.length(); i++) {
    if (st[i] == '(') {
      op++;
    } else if (st[i] == '#') {
      has++;
    } else {
      cls++;
    }
    if (cls + has > op) {
      cout << -1;
      return 0;
    }
  }
  int op1 = 0, cls1 = 0, ans;
  for (int i = 0; i < st.length(); i++) {
    if (st[i] == '(') {
      op1++;
    } else if (st[i] == ')') {
      cls1++;
    }
    if (ls == i) {
      ans = op - has - cls + 1;
      if (op1 < cls1 + op - cls) {
        cout << -1;
        return 0;
      }
    }
    if (ls < i) {
      if (cls1 + has + ans - 1 > op1) {
        cout << -1;
        return 0;
      }
    }
  }
  for (int i = 1; i < has; i++) {
    cout << 1 << endl;
  }
  cout << ans;
  return 0;
}
