#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  string s;
  cin >> s;
  int last_change = 0;
  int cnt = 0;
  for (int i = 0; i < (int)s.size(); ++i) {
    if (s[i] == '#') {
      last_change = i;
      ++cnt;
    }
  }
  int lvl = 0;
  for (int i = 0; i < (int)s.size(); ++i) {
    if (s[i] == '#' && i != last_change) s[i] = ')';
    if (s[i] == ')')
      --lvl;
    else {
      if (s[i] == '(') ++lvl;
    }
  }
  if (lvl <= 0) {
    cout << -1 << endl;
    return 0;
  }
  int last_add = lvl;
  lvl = 0;
  for (int i = 0; i < (int)s.size(); ++i) {
    if (s[i] == '(')
      ++lvl;
    else {
      if (s[i] == ')')
        --lvl;
      else {
        lvl -= last_add;
      }
    }
    if (lvl < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  for (int i = 0; i < cnt; ++i) {
    if (i + 1 == cnt)
      cout << last_add << endl;
    else
      cout << 1 << endl;
  }
  return 0;
}
