#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  int l = 0, r = 0, k = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(') {
      l++;
      r++;
    } else if (s[i] == ')') {
      if (l == 0) {
        cout << -1;
        return 0;
      }
      l--;
      if (r != 0) r--;
    } else {
      k++;
      r = 0;
    }
    if (k > l) {
      cout << -1;
      return 0;
    }
  }
  if (r) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < k - 1; i++) cout << 1 << endl;
  cout << l - k + 1;
}
