#include <bits/stdc++.h>
using namespace std;
void solve() {
  string s;
  cin >> s;
  vector<int> sh_pos;
  for (int(i) = 0; (i) < (s.size()); (i)++) {
    if (s[i] == '#') {
      sh_pos.push_back(i);
    }
  }
  int last_sh_pos = sh_pos.back();
  int to_close = 0;
  vector<int> ans;
  for (int i = (0); i < (int)(last_sh_pos + 1); i++) {
    if (s[i] == '(') {
      ++to_close;
    } else if (s[i] == ')') {
      --to_close;
    } else {
      --to_close;
      ans.push_back(1);
    }
    if (to_close < 0) {
      {
        cout << "-1" << endl;
        return;
      };
    }
  }
  int left_br = 0, right_br = 0;
  for (int i = (last_sh_pos); i < (int)(s.size()); i++)
    if (s[i] == '(') left_br++;
  for (int i = (last_sh_pos); i < (int)(s.size()); i++)
    if (s[i] == ')') right_br++;
  if (left_br > right_br || to_close < right_br - left_br) {
    {
      cout << -1 << endl;
      return;
    };
  }
  ans.back() += (to_close - (right_br - left_br));
  to_close -= (to_close - (right_br - left_br));
  for (int i = (last_sh_pos + 1); i < (int)(s.size()); i++) {
    if (s[i] == '(') {
      ++to_close;
    } else if (s[i] == ')') {
      --to_close;
    }
    if (to_close < 0) {
      {
        cout << "-1" << endl;
        return;
      };
    }
  }
  if (to_close != 0) {
    {
      cout << "-1" << endl;
      return;
    };
  }
  for (auto i : ans) cout << i << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  solve();
  return 0;
}
