#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> a;
  string s;
  cin >> s;
  int sum1 = 0;
  for (int i = s.size() - 1; s[i] != '#'; i--) {
    if (s[i] == ')')
      sum1++;
    else
      sum1--;
    if (sum1 < 0) {
      cout << -1;
      return 0;
    }
  }
  int sum = 0, ss = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '(')
      sum++;
    else if (s[i] == ')')
      sum--;
    else {
      if (sum == 0) {
        ss = -1;
        break;
      } else {
        a.push_back(1);
        sum--;
      }
    }
    if (sum < 0) {
      ss = -1;
      break;
    }
  }
  if (ss == -1)
    cout << ss;
  else {
    a[a.size() - 1] += sum;
    for (int i = 0; i < a.size(); i++) cout << a[i] << " ";
  }
  return 0;
}
