#include <bits/stdc++.h>
using namespace std;
string inttostr(int n) {
  stringstream rr;
  rr << n;
  return rr.str();
}
int main() {
  ios_base::sync_with_stdio(false);
  int n, i, j, l, k = 0;
  string s;
  vector<int> res;
  stack<int> st;
  cin >> s;
  l = s.length();
  for (i = l - 1; i >= 0; i--) {
    if (s[i] == '(')
      k++;
    else if (s[i] == ')')
      k--;
    else
      break;
  }
  if (k > 0) {
    cout << -1 << "\n";
    return 0;
  }
  for (i = 0; i < l; i++) {
    if (s[i] == '(') {
      if (i == l - 1) {
        cout << -1 << "\n";
        return 0;
      } else
        st.push(s[i]);
    } else if (s[i] == ')') {
      if (st.empty()) {
        cout << -1 << "\n";
        return 0;
      } else {
        st.pop();
      }
    } else {
      if (st.empty()) {
        cout << -1 << "\n";
        return 0;
      }
      res.push_back(1);
      st.pop();
    }
  }
  k = res.back() + st.size();
  res.pop_back();
  res.push_back(k);
  for (auto& x : res) cout << x << "\n";
  return 0;
}
