#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  while (cin >> s) {
    int cnt = 0, cnt2 = 0, pos;
    vector<int> v, v2;
    for (int i = 0; i < ((int)s.size()); i++) {
      if (s[i] == '#') {
        cnt2++;
        pos = i;
      }
      if (s[i] == '(')
        cnt++;
      else if (s[i] == ')')
        cnt--;
    }
    for (int i = 0; i < ((int)s.size()); i++) {
      if (i == pos) {
        v.push_back(-cnt + (cnt2 - 1));
        v2.push_back(-cnt + (cnt2 - 1));
        continue;
      }
      if (s[i] == '(') v.push_back(1);
      if (s[i] == ')') v.push_back(-1);
      if (s[i] == '#') {
        v.push_back(-1);
        v2.push_back(-1);
      }
    }
    bool b = 1;
    int s = 0;
    for (int i = 0; i < ((int)v.size()); i++) {
      if (v[i] > 1 || v[i] == 0) {
        b = 0;
        break;
      }
      s += v[i];
      if (s < 0) {
        b = 0;
        break;
      }
    }
    if (b == 1) {
      for (int i = 0; i < ((int)v2.size()); i++) {
        cout << -v2[i] << endl;
      }
    } else {
      cout << -1 << endl;
    }
  }
}
