#include <bits/stdc++.h>
using namespace std;
vector<int> ans;
int main() {
  ios_base::sync_with_stdio(0);
  string s;
  cin >> s;
  if (s.size() == 1) {
    cout << -1;
    return 0;
  }
  int lsp = 0;
  for (int i = 0; i < s.size(); ++i)
    if (s[i] == '#') lsp = i;
  int ob = 0;
  for (int i = 0; i < lsp; ++i) {
    if (s[i] == '(') ob++;
    if (s[i] == ')') {
      if (ob == 0) {
        cout << -1;
        return 0;
      }
      ob--;
    }
    if (s[i] == '#') {
      if (ob == 0) {
        cout << -1;
        return 0;
      }
      ans.push_back(1);
      ob--;
    }
  }
  ans.push_back(ob);
  ob = 0;
  for (int i = lsp + 1; i < s.size(); ++i) {
    if (s[i] == ')') {
      if (ob > 0)
        ob--;
      else if (ans[ans.size() - 1] > 1)
        ans[ans.size() - 1]--;
      else {
        cout << -1;
        return 0;
      }
    }
    if (s[i] == '(') ob++;
  }
  if (ob > 0) {
    cout << -1;
    return 0;
  } else
    for (int i = 0; i < ans.size(); ++i) cout << ans[i] << endl;
  return 0;
}
