#include <bits/stdc++.h>
using namespace std;
int main() {
  string input;
  cin >> input;
  vector<int> bal;
  int balance = 0;
  for (int i = 0; i < input.size(); ++i) {
    if (input[i] == '(') {
      ++balance;
    }
    if (input[i] == ')') {
      --balance;
    }
    if (input[i] == '#') {
      bal.push_back(1);
      --balance;
    }
    if (balance < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  if (balance > 0) {
    bal.back() = balance + 1;
  }
  balance = 0;
  int index = 0;
  for (int i = 0; i < input.size(); ++i) {
    if (input[i] == '(') {
      ++balance;
    }
    if (input[i] == ')') {
      --balance;
    }
    if (input[i] == '#') {
      balance -= bal[index++];
    }
    if (balance < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  if (balance > 0) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < bal.size(); ++i) {
    cout << bal[i] << endl;
  }
  return 0;
}
