#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
const double pi = acos(-1.0);
const int INF = 1000000007;
int n, m;
template <typename T>
inline void MustDie(T tmp) {
  cout << tmp;
  exit(0);
}
inline bool iscor(string s) {
  int bal = 0;
  for (int i = 0; i < (int)s.size(); ++i) {
    s[i] == '(' ? ++bal : --bal;
    if (bal < 0) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  string s;
  cin >> s;
  std::vector<int> c(max(')', max('(', '#')) + 1, 0);
  for (int i = 0; i < (int)s.size(); ++i) ++c[s[i]];
  if (c['('] <= c[')']) MustDie(-1);
  if (c['('] - c[')'] < c['#']) MustDie(-1);
  std::vector<int> a(c['#'], 1);
  a[c['#'] - 1] += c['('] - c[')'] - c['#'];
  string sans = "";
  int j = 0;
  for (int i = 0; i < (int)s.size(); ++i) {
    if (s[i] != '#')
      sans += s[i];
    else {
      for (int l = 0; l < (int)a[j]; ++l) sans += ')';
      ++j;
    }
  }
  if (iscor(sans))
    for (int i = 0; i < (int)c['#']; ++i) cout << a[i] << endl;
  else
    cout << -1;
  exit(0);
}
