#include <bits/stdc++.h>
using namespace std;
string s;
int main(int argc, char *argv[]) {
  ios_base::sync_with_stdio(false);
  cout.precision(10);
  cout << fixed;
  if (argc > 1 && fopen(argv[1], "r")) freopen(argv[1], "rt", stdin);
  cin >> s;
  int n = (int((s).size()));
  int stack = 0;
  int r = 0;
  int sharp = 0;
  for (int i = 0; i < (int)(n); ++i) {
    if (s[i] == '(')
      ++r, ++stack;
    else if (s[i] == ')')
      --r, --stack;
    else if (s[i] == '#')
      ++sharp, --stack;
    if (stack < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  if (sharp > r) {
    cout << -1 << endl;
    return 0;
  }
  vector<int> ans;
  for (int i = 0; i < (int)(sharp - 1); ++i) ans.push_back(1), --r;
  ans.push_back(r);
  int ptr = 0;
  stack = 0;
  for (int i = 0; i < (int)(n); ++i) {
    if (s[i] == '(')
      ++stack;
    else if (s[i] == ')')
      --stack;
    else if (s[i] == '#')
      stack -= ans[ptr++];
    if (stack < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  for (int i = 0; i < (int)((int((ans).size()))); ++i) cout << ans[i] << endl;
  return 0;
}
