#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > prime;
vector<int> a;
int gcd(int a, int b) {
  while (1) {
    a = a % b;
    if (a == 0) return b;
    b = b % a;
    if (b == 0) return a;
  }
}
int main() {
  string tmp, goal = "";
  cin >> tmp;
  int g = 0, g1 = 0, g2, s = 0;
  for (int i = 0; i < tmp.size(); i++) {
    if (tmp[i] == '(')
      g++;
    else if (tmp[i] == ')')
      g1++;
    else {
      g2 = i;
      s++;
    }
  }
  for (int i = 0; i < tmp.size(); i++) {
    if (tmp[i] == '(')
      goal += "(";
    else if (tmp[i] == ')')
      goal += ")";
    else if (i != g2)
      goal += ")";
    else {
      for (int j = 0; j < max((g - g1) - (s - 1), 1); j++) {
        goal += ")";
      }
    }
  }
  int k = (g - g1) - (s - 1);
  g1 = 0;
  g2 = 0;
  for (int i = 0; i < goal.size(); i++) {
    if (goal[i] == '(')
      g1++;
    else
      g2++;
    if (g2 > g1) {
      cout << -1;
      return 0;
    }
  }
  for (int i = 0; i < s - 1; i++) {
    cout << 1 << endl;
  }
  cout << k << endl;
  return 0;
}
