#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  cin >> s;
  long long bal = 0, n = s.size();
  vector<long long> ans;
  vector<long long> st;
  vector<long long> vis(n, 0);
  long long count = 0;
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] == '#') {
      if (bal <= count) {
        cout << -1;
        return 0;
      }
      count++;
    } else if (s[i] == '(') {
      bal++;
      st.push_back(i);
    } else {
      if (st.size() == 0) {
        cout << -1;
        return 0;
      }
      st.pop_back();
      bal--;
    }
  }
  while (st.size() > 0) {
    vis[st.back()] = 1;
    st.pop_back();
  }
  string str = "";
  long long a = 0, b = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '#') {
      str += s[i];
      a++;
    } else if (s[i] == '(' and vis[i] == 1) {
      str += s[i];
      b++;
    }
  }
  n = str.size();
  if (a > b or str[n - 1] == '(') {
    cout << -1;
    return 0;
  }
  for (long long i = 1; i < a; i++) cout << 1 << '\n';
  cout << b - (a - 1);
  return 0;
}
