#include <bits/stdc++.h>
using namespace std;
const int INF = 1000 * 1000 * 1000;
const long long INF64 = 1LL * INF * INF;
const long long mod = INF + 7;
void solve() {
  string s;
  cin >> s;
  int q = s.find_last_of("#");
  vector<int> ans;
  int bal = 0;
  for (int i = 0; i <= q; ++i) {
    if (s[i] == '(')
      bal++;
    else if (s[i] == ')') {
      bal--;
      if (bal < 0) {
        cout << -1 << endl;
        return;
      }
    } else if (i != q) {
      ans.push_back(1), bal--;
      if (bal < 0) {
        cout << -1 << endl;
        return;
      }
    } else {
      bal--;
      if (bal < 0) {
        cout << -1 << endl;
        return;
      }
      int bbal = 0;
      for (int i = s.size() - 1; i > q; --i) {
        if (s[i] == '(') {
          bbal++;
          if (bbal > 0) {
            cout << -1 << endl;
            return;
          }
        } else if (s[i] == ')') {
          bbal--;
          if (-bbal > bal) {
            cout << -1 << endl;
            return;
          }
        }
      }
      if (bbal > 0) {
        cout << -1 << endl;
        return;
      }
      ans.push_back(bal + bbal + 1);
    }
  }
  for (int i = 0; i < ans.size(); ++i) {
    cout << ans[i] << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  solve();
  return 0;
}
