#include <bits/stdc++.h>
using namespace std;
const int MAXI = numeric_limits<int>::max() / 2;
const int MINI = numeric_limits<int>::min() / 2;
const long long MAXL = numeric_limits<long long>::max() / 2;
const long long MINL = numeric_limits<long long>::min() / 2;
int main(int argc, char* argv[]) {
  int i, j;
  string s;
  cin >> s;
  int n = s.size(), ls = -1;
  for ((ls) = (n - 1); (ls) >= (0); --(ls))
    if (s[ls] == '#') break;
  bool f = true;
  int res = 0;
  vector<int> ans;
  for ((i) = (n - 1); (i) >= (ls + 1); --(i)) {
    if (s[i] == ')')
      ++res;
    else if (--res < 0) {
      f = false;
      break;
    }
  }
  if (f) {
    int cnt = 0;
    for ((i) = (0); (i) < (ls); ++(i)) {
      if (s[i] == '(')
        ++cnt;
      else {
        if (--cnt < 0) {
          f = false;
          break;
        }
        if (s[i] == '#') ans.push_back(1);
      }
    }
    if (res >= cnt)
      f = false;
    else
      ans.push_back(cnt - res);
  }
  if (f) {
    for ((i) = (0); (i) < (ans.size()); ++(i)) cout << ans[i] << endl;
  } else {
    cout << -1 << endl;
  }
  return 0;
}
