#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
char s[N];
int main() {
  while (~scanf("%s", s)) {
    int sum = 0, flag = 1, len = strlen(s), cnt = 0;
    int last;
    for (int i = 0; i < len; i++) {
      if (s[i] == '#') last = i;
    }
    for (int i = 0; i <= last; i++) {
      if (s[i] == '(')
        sum++;
      else if (s[i] == ')')
        sum--;
      else if (s[i] == '#') {
        sum--;
        cnt++;
      }
      if (sum < 0) {
        flag = 0;
        break;
      }
    }
    sum++;
    int sum2 = 0, flag2 = 1;
    for (int i = last + 1; i < len; i++) {
      if (s[i] == '(')
        sum2++;
      else
        sum2--;
    }
    if (sum2 > 0 || s[len - 1] == '(') flag2 = 0;
    if (flag && flag2) {
      for (int i = 0; i < cnt; i++) {
        if (i != cnt - 1)
          printf("%d\n", 1);
        else
          printf("%d\n", sum + sum2 == 0 ? -1 : sum + sum2);
      }
    } else
      printf("%d\n", -1);
  }
  return 0;
}
