#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int met[111111];
int main() {
  string s;
  cin >> s;
  int kol = 0;
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == '(')
      v.push_back(i);
    else if (s[i] == ')' && !v.empty())
      v.pop_back();
    else if (s[i] == ')') {
      cout << -1;
      return 0;
    } else
      ++kol;
  }
  memset(met, 0, sizeof(met));
  for (int i = 0; i < v.size(); ++i) {
    met[v[i]] = 1;
  }
  for (int i = 1; i < 111000; ++i) {
    met[i] += met[i - 1];
  }
  int kl = 0, ans = 0;
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == '#') ++kl;
    if (kl == kol) {
      if (s[i] == '(')
        ++ans;
      else if (s[i] == ')' && ans > 0)
        --ans;
    }
  }
  if (ans > 0) {
    cout << -1;
    return 0;
  }
  int k = 0;
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == '#') {
      if (met[i] - k == 0) {
        cout << -1;
        return 0;
      }
      ++k;
    }
  }
  if (v.size() - kol + 1 <= 0) {
    cout << -1;
    return 0;
  }
  for (int i = 1; i < kol; ++i) {
    cout << 1 << endl;
  }
  cout << v.size() - kol + 1;
  return 0;
}
