#include <bits/stdc++.h>
using namespace std;
const int M = (int)1e8 + 7;
int main() {
  string s;
  cin >> s;
  int n = (s).size();
  string ans;
  int x = 0;
  int o = 0;
  int c = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(') o++;
    if (s[i] == ')') {
      c++;
    }
    if (s[i] == '#') {
      x = i;
      c++;
    }
  }
  int balance = 0;
  if (o - c + 1 <= 0) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < (s).size(); ++i) {
    if (s[i] == '#') {
      if (i != x) {
        balance--;
        ans += ')';
      } else {
        for (int j = 0; j < o - c + 1; ++j) {
          ans += ')';
          balance--;
        }
      }
    } else if (s[i] == '(') {
      ans += '(';
      balance++;
    } else {
      ans += ')';
      balance--;
    }
    if (balance < 0) {
      cout << -1;
      return 0;
    }
  }
  for (int i = 0; i < (s).size(); ++i) {
    if (s[i] == '#') {
      if (x != i)
        cout << 1 << endl;
      else {
        cout << o - c + 1 << endl;
      }
    }
  }
}
