#include <bits/stdc++.h>
using namespace std;
string s;
int maxi = -1;
int temp = 0;
int temp2 = 0;
int cnt = 0;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  for (int i = 0, len = s.length(); i < len; i++) {
    if (s[i] == '#') maxi = i;
  }
  int i = 0;
  int len = s.length();
  while (i < len) {
    if (i <= maxi) {
      if (s[i] == '(') temp++;
      if (s[i] == ')') temp--;
      if (s[i] == '#') {
        if (temp <= 0) {
          cout << -1 << endl;
          return 0;
        } else
          cnt++;
      }
      if (temp < 0) {
        cout << -1 << endl;
        return 0;
      }
    } else {
      while (s[i] != '(' and i < len) {
        temp--;
        i++;
      }
      for (int j = i; j < len; j++) {
        if (s[j] == '(') temp2++;
        if (s[j] == ')') temp2--;
      }
      break;
    }
    i++;
  }
  if (temp2 > 0 or cnt > temp) {
    cout << -1 << endl;
    return 0;
  } else {
    temp += temp2;
    if (cnt > temp) {
      cout << -1 << endl;
    } else {
      for (int i = 0; i < cnt; i++) {
        if (i == cnt - 1) {
          cout << temp - cnt + 1 << endl;
        } else {
          cout << 1 << endl;
        }
      }
    }
  }
}
