#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e5 + 10, INF = 1e18;
int T, c;
const int mod = 1e9 + 7;
int n, open, close, emp, last_emp;
string s;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> s;
  n = s.length();
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      open++;
    else if (s[i] == ')')
      close++;
    else {
      emp++;
      last_emp = i;
    }
  }
  if (open - close < emp) {
    cout << -1;
    return 0;
  }
  vector<int> ans;
  int rem = open - close;
  open = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == ')') {
      if (open > 0)
        open--;
      else {
        cout << -1;
        return 0;
      }
    } else if (s[i] == '#') {
      if (open > 0) {
        if (i == last_emp) {
          if (open >= rem) {
            ans.push_back(rem);
            open -= rem;
            rem = 0;
          } else {
            cout << -1;
            return 0;
          }
        } else {
          open--;
          rem--;
          ans.push_back(1);
        }
      } else {
        cout << -1;
        return 0;
      }
    } else
      open++;
  }
  ans.back() += open;
  for (auto x : ans) cout << x << '\n';
}
