#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[100009];
  int arr[100009];
  int nc = 0, no = 0, nh = 0, len, i, j, count = 0;
  cin >> str;
  len = strlen(str);
  for (i = 0; i < len; i++) {
    if (str[i] == '(') {
      no++;
      arr[i] = 1;
    } else if (str[i] == ')') {
      nc++;
      arr[i] = -1;
    } else {
      nh++;
    }
    if (no < nh + nc) {
      cout << "-1";
      return 0;
    }
  }
  j = 1;
  for (i = 0; i < len; i++) {
    if (str[i] == '#' && j != nh) {
      arr[i] = -1;
      j++;
    } else if (str[i] == '#' && j == nh) {
      arr[i] = -(no - (nc) - (nh - 1));
      j++;
    }
  }
  for (i = len - 1; i >= 0; i--) {
    count += arr[i];
    if (count > 0) {
      cout << "-1";
      return 0;
    }
  }
  for (i = 1; i < nh; i++) cout << "1" << endl;
  cout << no - (nc) - (nh - 1);
  return 0;
}
