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

-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 <class C>
void mini(C &a4, C b4) {
  a4 = min(a4, b4);
}
template <class C>
void maxi(C &a4, C b4) {
  a4 = max(a4, b4);
}
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  os << "[";
  for (auto vv : V) os << vv << ",";
  return os << "]";
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
const int mod = 1e9 + 7, N = 1e6;
long long INF = 1e18;
int main() {
  string s;
  cin >> s;
  int n = ((int)s.size());
  int th = 0, to = 0, tc = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(') to++;
    if (s[i] == ')') tc++;
    if (s[i] == '#') th++;
  }
  int diff = to - tc;
  if (th > diff) {
    cout << -1;
    return 0;
  }
  diff = diff - th;
  int ocurr = 0, ccurr = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(') ocurr++;
    if (s[i] == ')') ccurr++;
    if (s[i] == ')' && ccurr > ocurr) {
      cout << -1;
      return 0;
    }
    if (s[i] == '#') {
      if (ccurr == ocurr) {
        cout << -1;
        return 0;
      }
      int xx = ocurr - (ccurr + 1);
      int given = min(diff, xx) + 1;
      cout << given << '\n';
      diff = diff - (given - 1);
    }
  }
}
