#include <bits/stdc++.h>
using namespace std;
int main() {
  int sum = 0, sum2 = 0, ans = 0;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '(') sum++;
    if (s[i] == ')') sum--;
    if (s[i] == '#') {
      ans++;
      sum--;
    }
    if (sum < 0) {
      cout << -1;
      return 0;
    }
  }
  for (int i = s.length() - 1; i >= 0 && s[i] != '#'; i--) {
    if (s[i] == '(') sum2++;
    if (s[i] == ')') sum2--;
    if (sum2 > 0) {
      cout << -1;
      return 0;
    }
  }
  for (int i = 0; i < ans - 1; i++) cout << 1 << endl;
  cout << sum + 1;
}
