#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[150000];
  scanf("%s", s);
  int n = strlen(s);
  int bal = 0;
  int ans[n], sz = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(') {
      ++bal;
    } else {
      --bal;
      if (bal < 0) {
        puts("-1");
        return 0;
      }
      if (s[i] == '#') {
        ans[sz++] = 1;
      }
    }
  }
  ans[sz - 1] += bal;
  int cnt = 0;
  bal = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(')
      ++bal;
    else if (s[i] == ')')
      --bal;
    else {
      bal -= ans[cnt];
      ++cnt;
    }
    if (bal < 0) {
      puts("-1");
      return 0;
    }
  }
  if (bal != 0) {
    puts("-1");
    return 0;
  }
  for (int i = 0; i < sz; ++i) {
    printf("%d\n", ans[i]);
  }
  return 0;
}
