#include <bits/stdc++.h>
using namespace std;
void fnc(string s) {
  int l_i = s.size() - 1;
  for (; l_i >= 0 && s[l_i] != '#'; l_i--) {
  }
  int extra = 0;
  int fg = 0;
  for (int i = l_i + 1; i < s.size(); i++) {
    if (s[i] == ')')
      extra++;
    else
      extra--;
  }
  int ct = 0;
  vector<int> ans;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '(')
      ct++;
    else if (s[i] == ')')
      ct--;
    else if (i == l_i) {
      ans.push_back(ct - extra);
      ct = extra;
    } else {
      ans.push_back(1);
      ct--;
    }
    if (ct < 0) {
      fg = 1;
      break;
    }
  }
  if (ct || fg == 1) {
    cout << "-1";
    return;
  }
  for (int i = 0; i < ans.size(); i++) {
    if (ans[i] <= 0) {
      cout << "-1";
      return;
    }
  }
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  fnc(s);
  return 0;
}
