#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  if (str[0] == ')' || str[0] == '#' || str[str.size() - 1] == '(') {
    cout << "-1";
    return 0;
  }
  int countOp = 0, countClo = 0, countSym = 0, count = 0, aux, c = 0;
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == '(') {
      if (c == 0) {
        countSym = 0;
      }
      c++;
      countOp++;
    } else if (str[i] == ')') {
      c--;
      countClo++;
    } else {
      countSym++;
      c--;
      count++;
    }
    if (c < 0) {
      cout << "-1";
      return 0;
    }
  }
  int dif = countOp - countClo;
  aux = count;
  if (dif == 0 || dif < 0 || dif < countSym) cout << "-1" << endl;
  if (countSym == 0)
    cout << "-1" << endl;
  else {
    for (int i = 0; i < count; i++) {
      if (i == (count - 1) && dif > 0) {
        cout << dif--;
        break;
      }
      dif--;
      cout << "1" << endl;
    }
  }
  return 0;
}
