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

-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 T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& a) {
  in >> a.first >> a.second;
  return in;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1, T2> a) {
  out << a.first << " " << a.second;
  return out;
}
template <typename T, typename U>
static inline void amin(T& x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
static inline void amax(T& x, U y) {
  if (x < y) x = y;
}
vector<string> vec_splitter(string s) {
  for (char& c : s) c = c == ',' ? ' ' : c;
  stringstream ss;
  ss << s;
  vector<string> res;
  for (string z; ss >> z; res.push_back(z))
    ;
  return res;
}
void debug_out(vector<string> __attribute__((unused)) args,
               __attribute__((unused)) int idx,
               __attribute__((unused)) int LINE_NUM) {
  cerr << endl;
}
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) {
  if (idx > 0)
    cerr << ", ";
  else
    cerr << "Line(" << LINE_NUM << "): ";
  stringstream ss;
  ss << H;
  cerr << args[idx] << " = " << ss.str();
  debug_out(args, idx + 1, LINE_NUM, T...);
}
long long int power(long long int b, long long int e) {
  assert(e >= 0);
  if (e == 0) return 1;
  if (e % 2 == 1)
    return b * power(b * b, (e - 1) / 2);
  else
    return power(b * b, e / 2);
}
long long int power(long long int b, long long int e, long long int m) {
  assert(e >= 0);
  if (e == 0) return 1;
  if (e % 2 == 1)
    return b * power(((b % m) * (b % m)) % m, (e - 1) / 2, m) % m;
  else
    return power(((b % m) * (b % m)) % m, e / 2, m) % m;
}
const long double pi = acos(-1);
constexpr int mod = 1e9 + 7;
void swagWaalaFunction() {
  long long int n, ans = 0, op = 0, cl = 0, open = 0, close = 0, hash = 0,
                   cnt = 0, xtra = 0;
  string s;
  cin >> s;
  vector<long long int> v;
  n = (long long int)s.size();
  for (auto i : s) open += (i == '('), close += (i == ')'), hash += (i == '#');
  if ((open <= close and hash) or (open < close)) {
    cout << -1;
    return;
  }
  for (long long int i = 0; i < (long long int)n; ++i) {
    if (s[i] == '(')
      op++;
    else if (s[i] == ')')
      cl++;
    else {
      cnt++;
      if (cnt != hash) {
        v.push_back(1);
        cl++;
        xtra++;
      } else {
        v.push_back(open - close - xtra);
        cl += (open - close - xtra);
      }
    }
    if (cl > op) {
      cout << -1;
      return;
    }
  }
  for (auto i : v) cout << i << "\n";
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int tc = 1;
  for (long long int i = 0; i < (long long int)tc; ++i) {
    swagWaalaFunction();
  }
  return 0;
}
