#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100009;
int last, x;
int n, a, d;
char s[MAXN];
int main() {
  scanf("%s", s);
  n = strlen(s);
  for (int i = 0; i < n; i++)
    if (s[i] == '#') last = i, d++;
  for (int i = 0; i <= last; i++) {
    a += (s[i] == '(' ? +1 : -1);
    if (a < 0) {
      printf("-1");
      return 0;
    }
  }
  x = a + 1, a = 0;
  for (int i = last + 1; i < n; i++) {
    a += (s[i] == '(' ? +1 : -1);
    if (a < 0) x--, a++;
  }
  if (x < 1 || a != 0) {
    printf("-1");
    return 0;
  }
  for (int i = 0; i < d - 1; i++) printf("1\n");
  printf("%d", x);
}
