#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  vector<int> ans;
  int num = 0;
  cin >> s;
  int last = -1;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '#') {
      if (num == 0) {
        cout << -1;
        return 0;
      }
      ans.push_back(1);
      last = i;
      num--;
    } else if (s[i] == '(')
      num++;
    else if (s[i] == ')') {
      if (num == 0) {
        cout << -1;
        return 0;
      }
      num--;
    }
  }
  if (ans.size() != 0) ans[ans.size() - 1] += num;
  num = 0;
  for (int i = s.length() - 1; i > last; i--) {
    if (s[i] == ')') num++;
    if (s[i] == '(') {
      if (num == 0) {
        cout << -1;
        return 0;
      }
      num--;
    }
  }
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << "\n";
}
