#include <bits/stdc++.h>
using namespace std;
string s;
int a, b, L, B;
vector<int> v, v2;
int main() {
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '(')
      a++;
    else if (s[i] == ')')
      b++;
    else
      B++;
    if (b + B > a) {
      cout << -1;
      return 0;
    }
  }
  int Q = 0, W = 0;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '(')
      Q++;
    else if (s[i] == ')')
      W++;
    else {
      if (Q > W) {
        cout << -1;
        return 0;
      } else
        break;
    }
    if (Q > W) {
      cout << -1;
      return 0;
    }
  }
  b += B;
  if (a < b) {
    cout << -1;
    return 0;
  }
  for (int i = 1; i < B; i++) cout << 1 << endl;
  if (a >= b) cout << a - b + 1 << endl;
}
