#include <bits/stdc++.h>
using namespace std;
char s[100050];
int c[100050];
int main() {
  while (~scanf("%s", s)) {
    memset(c, 0, sizeof(c));
    int i, a, c1, c2;
    int len = strlen(s);
    a = c1 = c2 = 0;
    for (i = 0; i < len; ++i) {
      if (s[i] == ')')
        ++c1;
      else if (s[i] == '(')
        ++c2;
      else
        ++a;
    }
    int tot = a;
    if (c1 + a > c2) {
      printf("-1\n");
      continue;
    }
    int temp1 = 0, temp2 = 0, j;
    for (i = 0; i < len; ++i) {
      if (s[i] == ')') ++temp1;
      if (s[i] == '(') ++temp2;
      if (s[i] == '#') {
        if ((--a) == 0) {
          int cou = 0;
          j = len - 1;
          while (j > i) {
            if (s[j] == ')') ++cou;
            --j;
          }
          int temp = c2 - temp1 - cou;
          temp1 += temp;
          c[a] = temp;
        } else {
          ++temp1;
          c[a] = 1;
        }
      }
      if (temp1 > temp2) break;
    }
    if (temp1 > temp2)
      printf("-1\n");
    else {
      for (i = tot - 1; i >= 0; i--) printf("%d\n", c[i]);
    }
  }
  return 0;
}
