#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  int len = str.size(), i, j, k;
  int left = 0, right = 0, hash = 0;
  for (i = 0; i < len; i++) {
    if (str[i] == '(')
      left++;
    else if (str[i] == ')')
      right++;
    else
      hash++;
    if (right + hash > left) {
      cout << "-1" << endl;
      return 0;
    }
  }
  int h = 0;
  for (i = 0; i < len; i++) {
    if (str[i] == '#') {
      h++;
      if (h < hash) {
        str[i] = ')';
      } else if (h == hash) {
        str[i] = 'X';
      }
    }
  }
  int x = left - (hash - 1) - right;
  int rem = 0;
  for (i = 0; i < len; i++) {
    if (str[i] == '(')
      rem++;
    else if (str[i] == ')')
      rem--;
    else if (str[i] == 'X')
      rem = rem - x;
    if (rem < 0) {
      cout << "-1" << endl;
      return 0;
    }
  }
  if (rem != 0) {
    cout << "-1" << endl;
    return 0;
  }
  for (i = 0; i < hash - 1; i++) cout << "1" << endl;
  cout << x << endl;
  return 0;
}
