#include <bits/stdc++.h>
using namespace std;
string S;
int sum = 0;
vector<int> indices;
int res[100005];
int pref[100005];
int main() {
  cin >> S;
  bool nema = (S[S.size() - 1] == '(');
  int cnt = 0;
  for (int i = 0; i < S.size(); i++) {
    if (S[i] == '(') sum++;
    if (S[i] == ')') sum--;
    pref[i] = sum;
    if (S[i] == '#') {
      indices.push_back(i);
      cnt++;
      if (sum < cnt) {
        nema = 1;
      }
    }
  }
  if (nema || sum < (int)indices.size()) {
    cout << -1 << "\n";
    return 0;
  }
  int firstSum = sum;
  for (int i = 0; i < indices.size(); i++) {
    S[indices[i]] = ')';
  }
  sum = 0;
  for (int i = 0; i < S.size(); i++) {
    if (S[i] == '(') sum++;
    if (S[i] == ')') sum--;
    pref[i] = sum;
    if (sum < 0) {
      cout << -1 << "\n";
      return 0;
    }
  }
  string fir = S.substr(0, indices.back() + 1);
  string rem = S.substr(indices.back() + 1);
  for (int i = 0; i < firstSum - (int)indices.size(); i++) {
    fir += ")";
  }
  S = fir + rem;
  sum = 0;
  for (int i = 0; i < S.size(); i++) {
    if (S[i] == '(') sum++;
    if (S[i] == ')') sum--;
    pref[i] = sum;
    if (sum < 0) {
      cout << -1 << "\n";
      return 0;
    }
  }
  if (sum != 0) {
    cout << -1 << "\n";
    return 0;
  }
  for (int i = 0; i < indices.size() - 1; i++) cout << 1 << "\n";
  cout << firstSum - (int)indices.size() + 1 << "\n";
}
