#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000000 + 7;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  long long n = s.size();
  queue<char> q;
  queue<char> q1;
  vector<long long> ans;
  long long pos = n;
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == '#') {
      pos = i;
      break;
    }
  }
  if (pos == n) {
    for (int i = 0; i < n; i++) {
      if (s[i] == '(')
        q.push('(');
      else {
        if (q.empty()) {
          cout << "-1";
          return 0;
        } else
          q.pop();
      }
    }
    if (q.empty())
      cout << "0";
    else
      cout << "-1";
  } else {
    for (int i = 0; i < pos; i++) {
      if (s[i] == '(')
        q.push('(');
      else {
        if (q.empty()) {
          cout << "-1";
          return 0;
        } else if (s[i] == '#')
          ans.push_back(1);
        q.pop();
      }
    }
    for (long long j = n - 1; j > pos; j--) {
      if (s[j] == ')')
        q1.push(')');
      else {
        if (q1.empty()) {
          cout << "-1";
          return 0;
        } else
          q1.pop();
      }
    }
    if (q.size() <= q1.size()) {
      cout << "-1";
      return 0;
    } else
      ans.push_back(q.size() - q1.size());
  }
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << endl;
  return 0;
}
