#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:256000000")
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.length();
  vector<int> b(n);
  int bal = 0;
  int last = -1;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(')
      b[i] = 1;
    else
      b[i] = -1;
    if (s[i] == '#') last = i;
    bal += b[i];
    if (bal < 0) {
      cout << "-1" << endl;
      return 0;
    }
  }
  if (bal != 0 && last == -1) {
    cout << "-1" << endl;
    return 0;
  }
  if (last != -1) b[last] -= bal;
  bal = 0;
  for (int i = 0; i < n; ++i) {
    bal += b[i];
    if (bal < 0) {
      cout << "-1" << endl;
      return 0;
    }
  }
  for (int i = 0; i < n; ++i) {
    if (s[i] == '#') printf("%d\n", -b[i]);
  }
  return 0;
}
