#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int main() {
  string s;
  cin >> s;
  int n = s.size(), cnt = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      cnt++;
    else
      cnt--;
    if (s[i] == '#') v.push_back(1);
    if (cnt < 0) {
      cout << -1;
      return 0;
    }
  }
  v[v.size() - 1] += cnt;
  int vec = 0;
  cnt = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      cnt++;
    else if (s[i] == ')')
      cnt--;
    else {
      cnt -= v[vec];
      vec++;
    }
    if (cnt < 0) {
      cout << -1;
      return 0;
    }
  }
  for (int i = 0; i < v.size(); i++) cout << v[i] << endl;
}
