#include <bits/stdc++.h>
using namespace std;
const int MAXPOW = 20;
const int MAXA = 1048577;
const int MAXN = 100009;
const int MAXM = 100009;
bool solve(const string& s, vector<int>& counts) {
  vector<int> balances(s.length());
  int balance = 0;
  int lastHash = -1;
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == '(') {
      ++balance;
    }
    if (s[i] == ')') {
      --balance;
    }
    if (s[i] == '#') {
      lastHash = i;
      counts.push_back(1);
      --balance;
    }
    balances[i] = balance;
    if (balance < 0) {
      return false;
    }
  }
  if (balance == 0) {
    return true;
  }
  if ((lastHash == -1) && (balance != 0)) {
    return false;
  }
  int b = 0;
  for (int i = s.length() - 1; i > lastHash; --i) {
    if (s[i] == ')') {
      ++b;
    } else {
      --b;
    }
    if (b < 0) {
      return false;
    }
  }
  if (balances[s.length() - 1] - balances[lastHash] > 0) {
    return false;
  }
  counts.back() += balance;
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  vector<int> counts;
  if (solve(s, counts)) {
    for (int i = 0; i < counts.size(); ++i) {
      cout << counts[i] << endl;
    }
  } else {
    cout << -1 << endl;
  }
  return 0;
}
