#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int noh = 0, cb = 0;
  for (int i = 0; s[i]; i++) {
    if (s[i] == '#') noh++;
    if (s[i] == '(') cb++;
    if (s[i] == ')') cb--;
    if (cb - noh + 1 <= 0) {
      cout << "-1";
      return 0;
    }
  }
  if (noh > cb) {
    cout << "-1";
    return 0;
  }
  int o = 0;
  for (int i = s.size() - 1; s[i] != '#'; i--) {
    if (s[i] == '(')
      o--;
    else
      o++;
    if (o < 0) {
      cout << "-1";
      return 0;
    }
  }
  for (int i = 1; i < noh; i++) cout << "1" << endl;
  cout << cb - (noh - 1);
  return 0;
}
