#include <bits/stdc++.h>
using namespace std;
int a[100000 + 10];
int main() {
  string ts, s = "+";
  cin >> ts;
  for (__typeof(100005) i = (0); i < (100005) + (0); i++) a[i] = -1;
  s += ts;
  int trf = 0, tlf = 0, trc = 0, tlc = 0, pos = 0;
  for (int i = int(s.size()) - 1; i >= 0; i--) {
    if (s[i] == '#' || s[i] == '+' || s[i] == ')') {
      if (tlf > trf) {
        if (a[pos] == -1) a[pos] = 0;
        a[pos] += tlf - trf;
        trc += tlf - trf;
        trf = 0;
        tlf = 0;
      } else if (tlf < trf) {
        trf = trf - tlf;
        tlf = 0;
        if (pos != 0 && a[pos] == -1) a[pos] = 0;
      } else {
        trf = 0;
        tlf = 0;
        if (pos != 0 && a[pos] == -1) a[pos] = 0;
      }
      if (s[i] == '#') pos = i;
    }
    if (s[i] == ')') trf++;
    if (s[i] == '(') tlf++;
  }
  for (__typeof(s.size() - 1) i = (1); i < (s.size() - 1) + (1); i++) {
    if (s[i] == ')') {
      trc++;
    }
    if (s[i] == '(') tlf++;
  }
  bool t = false;
  for (__typeof(100000 + 3) i = (1); i < (100000 + 3) + (1); i++) {
    if (a[i] > 0) {
      t = true;
      break;
    }
  }
  std::vector<int> ans, ll;
  if (a[0] != -1 || trc != tlf || t == false) {
    cout << -1;
    return 0;
  } else {
    for (__typeof(100000 + 3) i = (1); i < (100000 + 3) + (1); i++) {
      if (a[i] >= 0) ans.push_back(a[i]);
    }
    int t = 0;
    for (__typeof(ans.size() - 1) i = (0); i < (ans.size() - 1) + (0); i++) {
      t += ans[i] - 1;
      ll.push_back(1);
    }
    if (t < 0) {
      cout << -1;
      return 0;
    } else {
      ll.push_back(t + ans[int(ans.size() - 1)]);
      for (__typeof(ll.size()) i = (0); i < (ll.size()) + (0); i++) {
        cout << ll[i] << endl;
      }
    }
  }
}
