#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  int pref = 0;
  int kol = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '#') kol++;
    if (s[i] == '(')
      pref++;
    else
      pref--;
    if (pref < 0) {
      cout << "-1";
      return 0;
    }
  }
  string t;
  int sz = 0;
  int r = 0;
  while (sz < kol) {
    if (s[r] == '#') {
      sz++;
      t += ')';
      if (sz == kol) {
        for (int j = 0; j < pref; j++) t += ')';
      }
    } else {
      t += s[r];
    }
    r++;
  }
  while (r < n) {
    t += s[r];
    r++;
  }
  n = t.size();
  int preff = 0;
  for (int i = 0; i < n; i++) {
    if (t[i] == '(')
      preff++;
    else
      preff--;
    if (preff < 0) {
      cout << "-1";
      return 0;
    }
  }
  for (int i = 0; i < kol - 1; i++) {
    cout << 1 << endl;
  }
  cout << pref + 1;
}
