#include <bits/stdc++.h>
const long long inf = 0x3f3f3f3f3f3f3f3LL;
const long long mod = 1e9 + 7;
using namespace std;
template <class T>
void smin(T& a, T val) {
  if (a > val) a = val;
}
template <class T>
void smax(T& a, T val) {
  if (a < val) a = val;
}
template <typename T>
inline std::ostream& operator<<(std::ostream& os, const std::vector<T>& v) {
  bool first = true;
  os << "[";
  for (auto i : v) {
    if (!first) os << ", ";
    os << i;
    first = false;
  }
  return os << "]";
}
const long long N = 1e5 + 10;
long long lst[N];
string s;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> s;
  long long n = (long long)(s.size());
  s = 't' + s;
  long long prev = 0, open = 0, close = 0, has = 0;
  for (long long i = 1; i <= n; ++i) {
    open += (s[i] == '(');
    close += (s[i] == ')');
    has += (s[i] == '#');
    if (s[i] == '#') {
      prev = i;
    }
  }
  if (open < close + has) {
    cout << -1;
    return 0;
  }
  std::vector<long long> v;
  long long pref = 0;
  for (long long i = 1; i <= n; ++i) {
    if (s[i] == '#') {
      if (i == prev) {
        break;
      } else {
        pref--;
        if (pref < 0) {
          cout << -1;
          return 0;
        }
        v.push_back(1);
      }
    } else if (s[i] == '(') {
      pref++;
    } else {
      pref--;
      if (pref < 0) {
        cout << -1;
        return 0;
      }
    }
  }
  long long pref2 = 0;
  for (long long i = prev + 1; i <= n; ++i) {
    pref2 += (s[i] == '(') ? 1 : -1;
  }
  long long tt = -(pref + pref2);
  if (-tt < 0) {
    cout << -1;
    return 0;
  }
  pref += tt;
  if (pref < 0) {
    cout << -1;
    return 0;
  }
  for (long long i = prev + 1; i <= n; ++i) {
    pref += (s[i] == '(') ? 1 : -1;
    if (pref < 0) {
      cout << -1;
      return 0;
    }
  }
  v.push_back(-tt);
  for (auto it : v) {
    cout << it << '\n';
  }
  return 0;
}
