#include <bits/stdc++.h>
using namespace std;
inline void use_io_optimizations() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
}
int main() {
  use_io_optimizations();
  string s;
  cin >> s;
  int left = 0;
  int right = 0;
  int holes = 0;
  int last_hole = 0;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == '(') {
      ++left;
    } else if (s[i] == ')') {
      ++right;
    } else {
      ++holes;
      last_hole = i;
    }
  }
  int dif = 0;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == '(') {
      ++dif;
    } else if (s[i] == ')') {
      --dif;
    } else {
      if (i == last_hole) {
        dif -= max(left - right - holes + 1, 1);
      } else {
        --dif;
      }
    }
    if (dif < 0) {
      cout << -1 << '\n';
      return 0;
    }
  }
  for (int i = 0; i < holes; ++i) {
    if (i < holes - 1) {
      cout << "1\n";
    } else {
      cout << left - right - holes + 1 << '\n';
    }
  }
  return 0;
}
