#include <bits/stdc++.h>
using namespace std;
int n, m, len;
string u;
int fin, fin2;
int cnt, cnt2;
int main() {
  int i, j, k, t, a, b;
  cin >> u;
  for (i = 0; i < (int)u.size(); i++) {
    if (u[i] == '#') fin = i;
    if (u[i] == ')') fin2 = i;
  }
  cnt = 0;
  i = (int)u.size() - 1;
  int close = 0;
  while (i > fin) {
    if (u[i] == '(') {
      if (close <= 0) {
        cout << -1 << "\n";
        return 0;
      } else
        close--;
    } else
      close++;
    i--;
  }
  cnt = close;
  int now = 0;
  vector<int> ans;
  for (i = 0; i < (int)u.size(); i++) {
    if (u[i] == '(')
      now++;
    else if (u[i] == ')') {
      if (now <= 0) {
        cout << -1 << "\n";
        return 0;
      }
      now--;
    } else if (u[i] == '#') {
      if (i != fin) {
        if (now <= 0) {
          cout << -1 << "\n";
          return 0;
        }
        ans.push_back(1);
        now--;
      } else {
        if (now - cnt <= 0) {
          cout << -1 << "\n";
          return 0;
        }
        ans.push_back(now - cnt);
        now -= (now - cnt);
      }
    }
  }
  if (now != 0) {
    cout << -1 << "\n";
  } else {
    for (auto cur : ans) cout << cur << "\n";
  }
  return 0;
}
