#include <bits/stdc++.h>
using namespace std;
char str[100010];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> str;
  int len = strlen(str);
  int lhashid = -1;
  int rleft = 0;
  int rright = 0;
  for (int i = len - 1; i >= 0; i--) {
    if (str[i] == '(') rleft++;
    if (str[i] == ')') rright++;
    if (str[i] == '#') {
      lhashid = i;
      break;
    }
  }
  bool isgood = true;
  vector<int> ans;
  int left = 0, right = 0;
  for (int i = 0; i < len; i++) {
    if (str[i] == '(') left++;
    if (str[i] == ')') right++;
    if (str[i] == '#') {
      if (i == lhashid) {
        if (left + rleft < right + rright + 1) {
          isgood = false;
          break;
        }
        int diff = (left + rleft) - (right + rright);
        right += diff;
        ans.push_back(diff);
      } else {
        ans.push_back(1);
        right++;
      }
    }
    if (left < right) {
      isgood = false;
      break;
    }
  }
  if (!isgood)
    cout << "-1" << endl;
  else {
    for (int i = 0; i < (int)ans.size(); i++) {
      cout << ans[i] << endl;
    }
  }
}
