#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int cnt_l = count(s.begin(), s.end(), '(');
  int cnt_r = count(s.begin(), s.end(), ')');
  int cnt_sh = count(s.begin(), s.end(), '#');
  int need_cnt = cnt_l - cnt_r;
  if (need_cnt < cnt_sh) {
    puts("-1");
    return 0;
  }
  auto first_sh = find(s.begin(), s.end(), '#');
  int cnt_pref_l = count(s.begin(), first_sh, '(');
  int cnt_pref_r = count(s.begin(), first_sh, ')');
  if (cnt_pref_l < cnt_pref_r) {
    puts("-1");
    return 0;
  }
  vector<int> res;
  int cur_cnt_l = 0, cur_cnt_r = 0;
  for (int i = 0; s[i]; ++i) {
    if (s[i] == '(')
      ++cur_cnt_l;
    else if (s[i] == ')')
      ++cur_cnt_r;
    else {
      int add_cnt = cnt_sh == 1 ? need_cnt : 1;
      res.push_back(add_cnt);
      cur_cnt_r += add_cnt;
      --cnt_sh;
      need_cnt -= add_cnt;
    }
    if (cur_cnt_l < cur_cnt_r) {
      puts("-1");
      return 0;
    }
  }
  for (int i = 0; i < (int)res.size(); ++i) printf("%d\n", res[i]);
  return 0;
}
