#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double EPS = 1e-10;
string ipstr, opstr;
int a, b, c;
vector<int> solution;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> ipstr;
  for (int i = 0, _a = (ipstr.size()); i < _a; i++) {
    if (ipstr[i] == '(')
      ++a, ++c;
    else {
      --a;
      if (c > 0) --c;
      if (a < 0) {
        cout << -1 << endl;
        return 0;
      }
      if (ipstr[i] == '#') {
        c = 0;
        ++b;
      }
    }
  }
  if (c > 0) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = (1), _b = (b - 1); i <= _b; i++) cout << 1 << endl;
  cout << a + 1 << endl;
  return 0;
}
