#include <bits/stdc++.h>
using namespace std;
string s;
int sm, ff, ss, x;
int main() {
  cin >> s;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == '#') sm++;
    if (s[i] == '(') ff++;
    if (s[i] == ')') ss++;
    if (ss + sm > ff) {
      cout << -1;
      return 0;
    }
  }
  x = sm - 1;
  if (ff <= ss || s[s.size() - 1] == '(') {
    cout << -1;
    return 0;
  }
  int sq = 0, Sf = 0, Sj = 0;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == '#') sq++;
    if (s[i] == '(') Sf++;
    if (s[i] == ')') Sj++;
    if (sq == sm && s[i] == '#' && Sj + (ff - ss - x) > Sf) {
      cout << -1;
      return 0;
    }
  }
  while (--sm) cout << 1 << "\n";
  cout << ff - ss - x;
  exit(0);
}
