#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int a = 1;
  int b = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '(') a++;
    if (s[i] == ')') a--;
    if (s[i] == '#') {
      b++;
      a--;
    };
  }
  int c = 0;
  int d = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '(') c++;
    if (s[i] == ')') c--;
    if (s[i] == '#') {
      d++;
      c--;
      if (d == b) {
        c++;
        c -= a;
      }
    }
    if (c < 0) {
      cout << -1;
      return 0;
    }
  }
  if (a <= 0)
    cout << -1;
  else {
    for (int i = 1; i < b; i++) cout << "1\n";
    cout << a;
  }
  return 0;
}
