#include <bits/stdc++.h>
using namespace std;
char s[200100];
void printno() {
  printf("%d\n", -1);
  exit(0);
}
int number[200100];
int main() {
  scanf("%s", s);
  int len = (int)strlen(s);
  int num1 = 0, num2 = 0, num3 = 0;
  for (int i = 0; i < len; i++) {
    if (s[i] == '(')
      num1 += 1;
    else if (s[i] == ')')
      num2 += 1;
    else
      num3 += 1;
  }
  if (num2 + num3 > num1) printno();
  bool first = true;
  int d = num1 - (num2 + num3);
  for (int i = len - 1; i >= 0; i--) {
    if (s[i] == '#') {
      if (first) {
        first = false;
        number[i] = 1 + d;
      } else {
        number[i] = 1;
      }
    } else {
      number[i] = 1;
    }
  }
  d = 0;
  for (int i = 0; i < len; i++) {
    if (s[i] == '(')
      d -= number[i];
    else
      d += number[i];
    if (d > 0) printno();
  }
  for (int i = 0; i < len; i++) {
    if (s[i] == '#') {
      printf("%d\n", number[i]);
    }
  }
}
