#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[100005];
  int n, f = 0, c = 0, cl, last;
  cin >> s;
  n = strlen(s);
  for (int i = 0; i < n; ++i) {
    if (s[i] == '#') {
      s[i] = ')';
      last = i;
      f++;
    }
  }
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(')
      c++;
    else
      c--;
  }
  cl = c;
  if (c < 0) {
    cout << "-1\n";
    return 0;
  }
  c = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(')
      c++;
    else
      c--;
    if (i == last) c -= cl;
    if (c < 0) {
      cout << "-1\n";
      return 0;
    }
  }
  if (c != 0) {
    cout << "-1\n";
    return 0;
  }
  for (int i = 1; i < f; ++i) cout << "1\n";
  cout << cl + 1 << "\n";
  return 0;
}
