#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int main() {
  string s;
  ios::sync_with_stdio(false);
  ;
  int m, n, i, j, k, sum = 0, num;
  cin >> s;
  for (j = s.length() - 1; j >= 0; j--) {
    if (s[j] == ')') sum++;
    if (s[j] == '(') sum--;
    if (sum < 0) {
      cout << -1 << endl;
      return 0;
    }
    if (s[j] == '#') {
      num = j;
      break;
    }
  }
  int ans = 0;
  for (i = 0; i < s.length(); i++) {
    if (s[i] == '(') ans++;
    if (s[i] == ')') ans--;
    if (ans < 0) {
      cout << -1 << endl;
      return 0;
    }
    if (s[i] == '#') {
      if (i != num) {
        if (ans >= 1) {
          v.push_back(1);
          ans--;
        } else {
          cout << -1 << endl;
          return 0;
        }
      } else {
        if (ans <= sum) {
          cout << -1 << endl;
          return 0;
        } else {
          v.push_back(ans - sum);
        }
      }
    }
  }
  for (i = 0; i < v.size(); i++) cout << v[i] << endl;
}
