#include <bits/stdc++.h>
using namespace std;
const int num = 1e5 + 5;
char s[num];
int res[num];
int ind = 0;
int tmp;
int last;
int min(int a, int b) { return a < b ? a : b; }
int main() {
  scanf("%s", s + 1);
  int sum = 0;
  for (int i = 1; s[i] != '\0'; i++) {
    if (s[i] == '(')
      sum++;
    else {
      if (s[i] == '#') {
        res[++ind] = 1;
        last = i;
      }
      sum--;
      if (sum < 0) {
        cout << "-1" << endl;
        return 0;
      }
    }
  }
  tmp = sum;
  sum = 0;
  for (int i = 1; s[i] != '\0'; i++) {
    if (s[i] == '(')
      sum++;
    else {
      sum--;
      if (i == last) sum -= tmp;
      if (sum < 0) {
        cout << "-1" << endl;
        return 0;
      }
    }
  }
  for (int i = 1; i <= ind; i++) {
    if (i == ind) res[i] += tmp;
    printf("%d\n", res[i]);
  }
  return 0;
}
