#include <bits/stdc++.h>
using namespace std;
void solve() {
  string s;
  cin >> s;
  int n = (int)s.size();
  int cnt = 0;
  bool pos = true;
  vector<int> h;
  int re[n];
  memset(re, 0, sizeof(re));
  int k = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '#') {
      cnt++;
      h.push_back(i);
    }
    if (s[i] != '(')
      k--;
    else
      k++;
    if (k < 0) pos = false;
  }
  for (int i = 0; i < (int)h.size(); i++) {
    if (i == (int)h.size() - 1)
      re[h[i]] = k + 1;
    else
      re[h[i]] = 1;
  }
  k = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      k++;
    else if (s[i] == ')')
      k--;
    else
      k -= re[i];
    if (k < 0) pos = false;
  }
  if (pos && k == 0) {
    for (int i = 0; i < (int)h.size(); i++) cout << re[h[i]] << endl;
  } else
    cout << -1 << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int z;
  z = 1;
  while (z--) {
    solve();
  }
  return 0;
}
