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

-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>
#pragma comment(linker, "/STACK:10000000000")
using namespace std;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
template <typename T>
ostream& operator<<(ostream& o, vector<T> x) {
  for (auto it : x) o << it << ' ';
  return o;
}
template <typename T>
istream& operator>>(istream& i, vector<T>& x) {
  for (auto& it : x) i >> it;
  return i;
}
template <typename T1, typename T2>
void chkmin(T1& a, T2 b) {
  a > b ? a = b : 0;
}
template <typename T1, typename T2>
void chkmax(T1& a, T2 b) {
  a < b ? a = b : 0;
}
const long long INF = 1000000007;
const long long INF2 = 100000000000000007;
const long long mINF = 1e16;
const long long MOD1 = 998244353;
const long long MOD = 1000000007;
const long long SIZE = 200010;
const long long base = 53;
const long double eps = 1e-6;
const long double pi = acosl(-1.0);
long long add(long long a, long long b) { return ((a + b) % MOD + MOD) % MOD; }
long long mult(long long a, long long b) { return (a * b) % MOD; }
long long binpow(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) res = mult(res, a);
    a = mult(a, a);
    n >>= 1;
  }
  return res;
}
long long binpow1(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) {
      res *= a;
    }
    a *= a;
    n >>= 1;
  }
  return res;
}
long long inv(long long a) { return binpow(a, MOD - 2); }
long long del(long long a, long long b) { return mult(a, inv(b)); }
long long gcd(long long a, long long b) { return (b == 0 ? a : gcd(b, a % b)); }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
template <typename T>
T sqr(T x) {
  return x * x;
}
long long n, cur, need, a, b, cnt, mi;
string s, t;
vector<long long> ans;
vector<long long> kek;
bool ok;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  for (long long i = 0; i < s.size(); ++i) {
    if (s[i] == '(')
      a++;
    else if (s[i] == ')')
      b++;
    else
      mi++;
    if (a < b + mi) {
      cout << -1;
      return 0;
    }
  }
  need = a - b - mi;
  a = b = 0;
  for (long long i = 0; i < s.size(); ++i) {
    if (s[i] == '(')
      a++;
    else if (s[i] == ')')
      b++;
    else {
      cur = max(need, a - b - 1);
      ans.push_back(cur + 1);
      b += cur + 1;
      need -= cur;
    }
  }
  for (auto& i : ans) cout << i << endl;
  return 0;
}
