#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1e9 + 7;
void solve() {
  string s;
  cin >> s;
  int n = s.length();
  int total = 0, count = 0;
  int pos = -1, last;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      total++;
    else {
      if (s[i] == '#') {
        pos = i;
        count++;
      }
      total--;
    }
    if (total < 0) {
      cout << -1 << "\n";
      return;
    }
  }
  last = 1 + total;
  total = 0;
  for (int i = 0; i < n; i++) {
    if (i == pos) {
      total -= last;
    } else {
      if (s[i] == '(')
        total++;
      else
        total--;
    }
    if (total < 0) {
      cout << -1 << "\n";
      return;
    }
  }
  for (int i = 0; i < count - 1; i++) {
    cout << 1 << "\n";
  }
  cout << last << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
}
