#include <bits/stdc++.h>
using namespace std;
string s;
int n, strt_cnt, hash_cnt, end_cnt[100005];
vector<int> soln;
int main() {
  cin >> s;
  n = s.size();
  hash_cnt = count(s.begin(), s.end(), '#');
  for (int i = n - 1; i >= 0; i--) {
    end_cnt[i] = end_cnt[i + 1] + (s[i] == ')') - (s[i] == '(') + (s[i] == '#');
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == '(') {
      strt_cnt++;
    } else if (s[i] == ')') {
      strt_cnt--;
    } else if (s[i] == '#' && hash_cnt != 1) {
      strt_cnt--;
      hash_cnt--;
      soln.push_back(1);
    } else if (s[i] == '#' && hash_cnt == 1) {
      hash_cnt--;
      int pushing = (strt_cnt - end_cnt[i + 1]);
      if (pushing <= 0) {
        cout << "-1";
        return 0;
      }
      strt_cnt -= pushing;
      soln.push_back(pushing);
    }
    if (strt_cnt < 0) {
      cout << "-1";
      return 0;
    }
  }
  if (strt_cnt != 0) {
    cout << "-1";
    return 0;
  }
  for (int i = 0; i < soln.size(); i++) {
    cout << soln[i] << "\n";
  }
  return 0;
}
