#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int cl = 0, ha = 0, op = 0;
  string s, t;
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '(') {
      op++;
    }
    if (s[i] == ')') {
      cl++;
    }
    if (s[i] == '#') {
      ha++;
    }
  }
  int req = op - cl;
  int temp2 = req;
  int temp = ha;
  if (op == cl || op == 0 || cl > op || ha > op || ha > req) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '#' && ha > 1) {
      t.push_back(')');
      ha--;
      temp2--;
    } else if (s[i] == '#' && ha == 1) {
      for (int j = 1; j <= temp2; j++) {
        t.push_back(')');
      }
      ha = 0;
    } else {
      t.push_back(s[i]);
    }
  }
  int x = 0;
  for (int i = 0; i < t.length(); i++) {
    if (t[i] == '(') {
      x++;
    }
    if (t[i] == ')') {
      x--;
    }
    if (x < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  if (x == 0) {
    for (int i = 1; i < temp; i++) {
      cout << 1 << endl;
      req--;
    }
    cout << req << endl;
  } else {
    cout << -1 << endl;
  }
  return 0;
}
