#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  long long cnt = 0, cnt1 = 0;
  std::vector<long long> v;
  for (long long i = 0; i < s.length(); i++) {
    if (s[i] == '(')
      cnt++;
    else
      cnt--;
    if (s[i] == '#') v.push_back(1);
    if (cnt < 0 or cnt1 < 0) {
      cout << "-1";
      return 0;
    }
  }
  for (long long i = s.length() - 1; i >= 0; i--) {
    if (s[i] == ')')
      cnt1++;
    else if (s[i] == '(')
      cnt1--;
    else
      cnt1 += s.length();
    if (cnt1 < 0) {
      cout << "-1";
      return 0;
    }
  }
  v[v.size() - 1] += cnt;
  for (long long i = 0; i < v.size(); i++) cout << v[i] << '\n';
  return 0;
}
