#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e5 + 5;
const long long mod = 1000000007;
long long t;
long long i, j;
long long n, m, k;
long long x, y;
vector<long long> g;
string s;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> s;
  for (i = 0; i <= s.size() - 1; i++) {
    if (s[i] == '(')
      x++;
    else if (s[i] == ')')
      y++;
    else
      k++;
  }
  if (x <= y || (x - y) < k)
    cout << -1;
  else {
    long long tmp1 = 0;
    long long tmp2 = 0;
    long long tmp3 = x - y;
    long long zzz = 0;
    for (i = 0; i < s.size(); i++) {
      if (s[i] == '(')
        tmp1++;
      else if (s[i] == ')')
        tmp1--;
      if (tmp1 < 0 || tmp1 <= 0 && s[i] == '#') {
        zzz = 1;
        break;
      }
      if (s[i] == '#') {
        tmp2++;
        if (tmp2 < k) {
          g.push_back(1);
          tmp3--;
          tmp1--;
        } else {
          tmp1 -= tmp3;
          g.push_back(tmp3);
          if (tmp1 < 0) {
            zzz = 1;
            break;
          }
        }
      }
    }
    if (zzz == 1)
      cout << -1 << '\n';
    else {
      for (i = 0; i <= g.size() - 1; i++) cout << g[i] << '\n';
    }
  }
}
