#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  vector<int> res;
  int left = 0;
  int right = 0;
  int last = 0;
  int remaining = 0;
  for (int n = 0; n < s.size(); ++n) {
    if (s[n] == '#')
      last = n;
    else if (s[n] == '(')
      ++remaining;
    else
      --remaining;
  }
  for (int n = 0; n < s.size(); ++n) {
    if (s[n] == '(')
      ++left;
    else if (s[n] == ')')
      ++right;
    else if (s[n] == '#') {
      if (last == n) {
        if (remaining <= 0) {
          cout << -1 << endl;
          return 0;
        }
        res.push_back(remaining);
        right += remaining;
      } else {
        res.push_back(1);
        ++right;
        --remaining;
      }
    }
    if (left < right) {
      cout << -1 << endl;
      return 0;
    }
  }
  if (left < right) {
    cout << -1 << endl;
    return 0;
  }
  for (int n = 0; n < res.size(); ++n) {
    printf("%d\n", res[n]);
  }
  return 0;
}
