#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.length();
  int c1 = 0, c2 = 0, c3 = 0, c = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(') {
      c1++;
      c++;
    }
    if (s[i] == ')') {
      c2++;
      if (c != 0) c--;
    }
    if (s[i] == '#') {
      c = 0;
      c3++;
    }
    if (c2 + c3 > c1) {
      cout << -1;
      return 0;
    }
  }
  if (c > 0) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < c3 - 1; i++) {
    cout << 1 << endl;
    c2++;
  }
  cout << c1 - c2;
}
