#include <bits/stdc++.h>
using namespace std;
vector<int> res;
int main() {
  string s;
  getline(cin, s);
  int delta = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '(')
      delta++;
    else
      delta--;
  }
  if (delta < 0) {
    cout << -1 << endl;
    return 0;
  }
  delta++;
  int last = s.length() - 1;
  while (s[last] != '#') last--;
  int balance = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '(') balance++;
    if (s[i] == ')') balance--;
    if (s[i] == '#' && i != last) {
      res.push_back(1);
      balance--;
    }
    if (s[i] == '#' && i == last) {
      res.push_back(delta);
      balance -= delta;
    }
    if (balance < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  for (int i = 0; i < res.size(); i++) cout << res[i] << endl;
  return 0;
}
