#(#(#((##((()))(((#)(#()#(((()()(()#(##(((()(((()))#(((((()(((((((()#((#((()(#(((()(()##(()(((()((#(
 (#((((()
 (#((
 ((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((##
 (())((((#)
 (#(
 (#))(#(#)((((#(##((#(#((((#(##((((((#((()(()(())((()#((((#((()((((#(((((#(##)(##()((((()())(((((#(((
 ##((((((()
 #((#
 #))))
 (((((#(#(#(#()
 ((#(()#(##
 (((((((((((((((((((###################
 )((##((###
 (((()#(#)(
 ((#)(
 )(((())#
 ()((#((#(#()
 ((#(
 ()#(#())()()#)(#)()##)#((()#)((#)()#())((#((((((((#)()()(()()(((((#)#(#((((#((##()(##(((#(()(#((#))#

-1
 -1
 -1
 1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
 3
 -1
 -1
 -1
 -1
 -1
 1
1
1
5
 1
1
1
1
 1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
 -1
 -1
 -1
 -1
 1
1
3
 -1
 -1

#include <bits/stdc++.h>
using namespace std;
template <typename X>
ostream& operator<<(ostream& x, const vector<X>& v) {
  for (long long i = 0; i < v.size(); ++i) x << v[i] << " ";
  return x;
}
template <typename X>
ostream& operator<<(ostream& x, const set<X>& v) {
  for (auto it : v) x << it << " ";
  return x;
}
template <typename X, typename Y>
ostream& operator<<(ostream& x, const pair<X, Y>& v) {
  x << v.ff << " " << v.ss;
  return x;
}
template <typename T, typename S>
ostream& operator<<(ostream& os, const map<T, S>& v) {
  for (auto it : v) os << it.first << "=>" << it.second << endl;
  return os;
}
struct pair_hash {
  inline std::size_t operator()(
      const std::pair<long long, long long>& v) const {
    return v.first * 31 + v.second;
  }
};
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
int main() {
  string s;
  cin >> s;
  int n = s.size();
  vector<long long> ind;
  bool vis[n];
  memset(vis, false, sizeof vis);
  for (long long i = 0; i < n; i++)
    if (s[i] == '#') {
      ind.push_back(i);
      vis[i] = true;
    }
  string ss = s;
  int cl = 0;
  for (long long i = 0; i < n; i++) {
    if (vis[i]) {
      ss[i] = ')';
      cl++;
    }
    if (s[i] == ')') {
      cl++;
    }
  }
  if (cl > n - cl) {
    cout << -1 << endl;
    return 0;
  }
  int xp = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '(') {
      xp++;
    } else {
      xp--;
      if (xp < 0) {
        cout << -1 << endl;
        return 0;
      }
    }
  }
  int sf[n];
  sf[n - 1] = vis[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    sf[i] = sf[i + 1] + vis[i];
  }
  bool ff = true;
  xp = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == ')') {
      xp++;
    } else {
      xp--;
    }
    if (xp < 0) {
      if (sf[i] == 0) ff = false;
      break;
    }
  }
  if (!ff) {
    cout << -1 << endl;
    return 0;
  }
  for (long long i = 0; i < ind.size() - 1; i++) {
    cout << 1 << endl;
  }
  cout << 1 + n - cl - cl << endl;
}
