#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, j, k, n, m, a1 = 0, a0 = 0, a2 = 0, c = 0, d;
  vector<char> vc, s;
  char a;
  vector<long long int> vi;
  while (cin >> a) {
    s.push_back(a);
  }
  for (i = 0; i < s.size(); i++) {
    if (s[i] == '(')
      a1++;
    else if (s[i] == ')')
      a2++;
    else
      a0++;
  }
  if (a1 < a2 + a0) {
    cout << -1 << endl;
    return 0;
  }
  d = a1 - a2;
  a1 = 0;
  a2 = 0;
  for (i = 0; i < s.size(); i++) {
    if (a1 < a2) {
      cout << -1 << endl;
      return 0;
    }
    if (s[i] == '(') {
      a1++;
      vc.push_back('(');
    } else if (s[i] == ')') {
      a2++;
      vc.push_back(')');
    } else if (s[i] == '#' && a0 == 1) {
      vi.push_back(d);
      for (j = 0; j < d; j++) {
        vc.push_back(')');
        a2++;
      }
    } else {
      a2++;
      d--;
      a0--;
      vc.push_back(')');
      vi.push_back(1);
    }
  }
  for (i = 0; i < vi.size(); i++) {
    cout << vi[i] << endl;
  }
}
