#include <bits/stdc++.h>
using namespace std;
#pragma warning(disable : 4996)
char s[111111];
int ans[111111] = {0};
int n, d;
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  int cnt = 0, sum = 0;
  int last = n;
  for (int i = n; i >= 1; i--) {
    if (s[i] == '(') sum++;
    if (s[i] == ')') sum--;
    if (s[i] == '#') {
      last = i;
      break;
    }
  }
  if (sum > 0) {
    printf("-1\n");
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    if (s[i] == '(') cnt++;
    if (s[i] == ')') cnt--;
    if (s[i] == '#') {
      if (last == i) {
        ans[++d] = cnt + sum;
        if (cnt + sum <= 0) {
          printf("-1\n");
          return 0;
        }
        cnt -= ans[d];
      } else
        ans[++d] = 1, cnt--;
    }
    if (cnt < 0) {
      printf("-1\n");
      return 0;
    }
  }
  if (cnt > 0) {
    printf("-1\n");
    return 0;
  }
  for (int i = 1; i <= d; i++) printf("%d\n", ans[i]);
  return 0;
}
