#include <bits/stdc++.h>
using namespace std;
int u[100000];
stack<int> p;
int main() {
  string s;
  cin >> s;
  int g = 0, len = s.length(), f = 0, count1 = 0, count2 = 0, count3 = 0;
  for (int i = 0; i < len; i++) {
    if (s[i] == '(') {
      f++;
      count1++;
    }
    if (s[i] == '#') {
      count2++;
      u[i] = f;
      g = i;
    }
    if (s[i] == ')') {
      count3++;
      f--;
    }
  }
  int x = 0, y = 0;
  for (int i = 0; i < len; i++) {
    if (s[i] == '(') {
      x = i;
      p.push(s[i]);
    }
    if (s[i] == ')' || s[i] == '#') {
      if (p.empty()) {
        cout << "-1";
        return 0;
      } else
        p.pop();
    }
    if (s[i] == ')') x = -1;
    if (s[i] == '#') y = i;
  }
  if (x > y) {
    cout << "-1";
    return 0;
  }
  int d = 0;
  for (int i = g + 1; i < len; i++) {
    if (s[i] == '(')
      d++;
    else
      d--;
  }
  if (d > 0) {
    cout << "-1";
    return 0;
  }
  if (count3 > count1 || count1 - count3 < count2) {
    cout << "-1";
    return 0;
  }
  int h = count1 - count3 - count2;
  for (int i = 0; i < count2 - 1; i++) {
    if (s[i] == '#' && u[i] == 0) {
      cout << "-1";
      return 0;
    }
  }
  for (int i = 0; i < count2 - 1; i++) cout << "1" << endl;
  cout << h + 1 << endl;
  return 0;
}
