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