#include <bits/stdc++.h>
using namespace std;
int a[100005], b[100005], c[100005];
int main() {
  char s[100005];
  int flag = 0, i, j, hash = 0;
  scanf("%s", s);
  for (i = 0; s[i]; i++) {
    if (s[i] == '(')
      break;
    else {
      printf("-1");
      return 0;
    }
  }
  a[0] = 1;
  for (i = 1; s[i]; i++) {
    if (s[i] == '#') {
      hash++;
      b[i] = hash;
      a[i] = a[i - 1];
    } else {
      if (s[i] == '(')
        a[i] = a[i - 1] + 1;
      else
        a[i] = a[i - 1] - 1;
    }
  }
  for (j = i - 1; j >= 0; j--) {
    if (s[j] == '(') {
      printf("-1");
      return 0;
    } else
      break;
  }
  int kk;
  int lenght = i - 1, l;
  int q = 0;
  for (kk = lenght;; kk--) {
    if (s[kk] == ')')
      q++;
    else if (s[kk] == '(')
      q--;
    else
      break;
  }
  for (j = lenght; j >= 0; j--) {
    if (s[j] == '#') {
      l = a[j] - (b[j] - 1) - q;
      c[j] = l, flag = 1;
      for (i = j - 1; i >= 0; i--) {
        if (s[i] == '#') c[i] = 1, flag = 1;
      }
      goto in;
    }
  }
in:;
  flag = 0;
  int k2;
  stack<int> s1;
  for (i = 0; s[i]; i++) {
    if (s[i] == '(')
      s1.push(1);
    else if (s[i] == ')') {
      if (s1.empty()) {
        printf("-1");
        return 0;
      } else
        s1.pop();
    } else if (s[i] == '#') {
      k2 = c[i];
      while (k2--) {
        if (s1.empty()) {
          printf("-1");
          return 0;
        } else
          s1.pop();
      }
    }
  }
  if (s1.empty()) {
    for (i = 1; i <= lenght; i++) {
      if (c[i] > 0) {
        flag = 1;
        printf("%d\n", c[i]);
      }
    }
  }
  if (flag != 1) printf("-1");
}
