#include <bits/stdc++.h>
using namespace std;
const int inv = 1000000000;
const int minv = -inv;
const int max_n = 100010;
char s[max_n + 5];
int ns;
char r[2 * max_n];
int nr;
int last, nopen, nclose, nhash;
int res;
int main() {
  scanf("%s", s);
  for (ns = 0; s[ns] != 13 and s[ns] != 0; ++ns)
    ;
  s[ns] = 0;
  nopen = 0;
  nclose = 0;
  nhash = 0;
  last = -1;
  for (int i = 0; i < ns; ++i) {
    if (s[i] == '#') {
      last = i;
      ++nhash;
    } else if (s[i] == '(')
      ++nopen;
    else
      ++nclose;
  }
  if (nclose + nhash > nopen) {
    printf("%d\n", -1);
    return 0;
  }
  nr = 0;
  for (int i = 0; i < ns; ++i) {
    if (s[i] == '#') {
      r[nr++] = ')';
      if (i == last)
        for (int j = 0; j < nopen - nclose - nhash; ++j) r[nr++] = ')';
    } else if (s[i] == '(')
      r[nr++] = '(';
    else if (s[i] == ')')
      r[nr++] = ')';
  }
  res = nopen - nclose - nhash;
  nopen = 0;
  nclose = 0;
  for (int i = 0; i < nr; ++i) {
    if (r[i] == '(')
      ++nopen;
    else
      ++nclose;
    if (nopen < nclose) {
      printf("%d\n", -1);
      return 0;
    }
  }
  for (int i = 0; i < ns; ++i) {
    if (s[i] == '#') {
      if (i == last)
        printf("%d\n", res + 1);
      else
        printf("%d\n", 1);
    }
  }
  return 0;
}
