#include <bits/stdc++.h>
using namespace std;
int main() {
  int nopen = 0, nclose = 0;
  string s;
  cin >> s;
  int len = s.length();
  vector<int> pos;
  for (int i = (0); i < (len); i++) {
    if (s[i] == '(')
      nopen++;
    else if (s[i] == ')')
      nclose++;
    else
      pos.push_back(i);
  }
  int np = pos.size();
  if (nopen < nclose + np) {
    cout << -1 << "\n";
    return 0;
  }
  string str = "";
  for (int i = (0); i < (np - 1); i++) s[pos[i]] = ')';
  str = s.substr(0, pos[np - 1]);
  for (int i = (0); i < (nopen - nclose - np + 1); i++) str += ")";
  str += s.substr(pos[np - 1] + 1, len);
  int no = 0, nc = 0;
  len = str.length();
  for (int i = (0); i < (len); i++) {
    if (str[i] == '(')
      no++;
    else
      nc++;
    if (nc > no) {
      cout << -1 << "\n";
      return 0;
    }
  }
  for (int i = (0); i < (np - 1); i++) cout << 1 << "\n";
  cout << (nopen - nclose - np + 1) << "\n";
  return 0;
}
