#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int l = s.length();
  int open = 0;
  int closed = 0;
  int hash = 0;
  for (__typeof((l)) i = 0; i < (l); i++) {
    if (s[i] == '(') open++;
    if (s[i] == ')') closed++;
    if (s[i] == '#') hash++;
    if (open < (closed + hash)) {
      cout << "-1";
      return 0;
    }
  }
  if (hash == 0) {
    if (open != closed) {
      cout << "-1";
    }
    return 0;
  }
  int count = 0;
  int closed2 = 0;
  int open2 = 0;
  vector<int> ans;
  for (__typeof((l)) i = 0; i < (l); i++) {
    if (s[i] == '(') open2++;
    if (s[i] == ')') closed2++;
    if (s[i] == '#' && count < (hash - 1)) {
      ans.push_back(1);
      count++;
    } else if (s[i] == '#') {
      ans.push_back(open - count - closed);
      count += open - count - closed;
    }
    if (open2 < (closed2 + count)) {
      cout << "-1\n";
      return 0;
    }
  }
  for (__typeof(ans.begin()) it = ans.begin(); it != ans.end(); ++it)
    cout << *it << endl;
  return 0;
}
