#include <bits/stdc++.h>
using namespace std;
template <class T>
bool uin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool uax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  cout.precision(10);
  cout << fixed;
  string s;
  cin >> s;
  int b = 0;
  int cnt = 0, last = -1;
  for (int i = 0; i < (int)(s.size()); ++i) {
    if (s[i] == '(')
      ++b;
    else if (s[i] == ')')
      --b;
    else {
      ++cnt;
      last = i;
    }
  }
  int bb = 0;
  bool ok = b >= cnt;
  for (int i = 0; i < (int)(s.size()); ++i) {
    if (s[i] == '(')
      ++bb;
    else if (s[i] == ')')
      --bb;
    else if (i != last)
      --bb;
    else
      bb -= b - cnt + 1;
    ok &= bb >= 0;
  }
  if (ok) {
    for (int i = 0; i < (int)(cnt - 1); ++i) cout << 1 << '\n';
    cout << b - cnt + 1 << '\n';
  } else {
    cout << -1 << '\n';
  }
  return 0;
}
