#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  cin >> s;
  vector<long long> val;
  long long type1 = 0, type2 = 0, type3 = 0;
  long long ch1 = 0, ch2 = 0;
  if (s.size() == 1) {
    cout << -1 << endl;
    return 0;
  }
  for (long long i = 0; i < s.size(); ++i) {
    if (s[i] == '(') {
      type1++;
      ch1++;
    } else if (s[i] == ')') {
      type2++;
      ch2++;
      if (type1 != 0) {
        type1--;
      }
    } else if (s[i] == '#') {
      type3++;
      type1 = 0;
    }
    if (ch1 < ch2 + type3) {
      cout << -1 << endl;
      return 0;
    }
  }
  if (type1 > 0) {
    cout << -1 << endl;
    return 0;
  }
  for (long long i = 0; i < type3 - 1; ++i) {
    cout << 1 << endl;
    ch2++;
  }
  cout << ch1 - ch2 << endl;
}
