#include <bits/stdc++.h>
using namespace std;
int n, m, k, t, r1;
string s;
int a[100010];
int main() {
  cin >> s;
  int n = s.size();
  int q = 0;
  int cnt = 0;
  int open = 0;
  int close = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      open++;
    else
      close++;
    if (s[i] == '#') cnt++;
  }
  if (close > open) {
    cout << "-1";
    exit(0);
  }
  k = open - close;
  int ncnt = 0;
  int nopen = 0;
  int nclose = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(') {
      nopen++;
      if (nopen < nclose) {
        cout << "-1";
        exit(0);
      }
    } else if (s[i] == ')') {
      nclose++;
      if (nopen < nclose) {
        cout << "-1";
        exit(0);
      }
    } else {
      ncnt++;
      if (ncnt == cnt) {
        nclose += k + 1;
        a[q++] = k + 1;
      } else {
        nclose++;
        a[q++] = 1;
      }
      if (nopen < nclose) {
        cout << "-1";
        exit(0);
      }
    }
  }
  for (int i = 0; i < q; i++) {
    cout << a[i] << endl;
  }
  return 0;
}
