#include <bits/stdc++.h>
using namespace std;
char s[200001], s1[200001];
int n, m, sum, gang, ans[200001], cnt;
int main() {
  scanf("%s", s1 + 1);
  m = strlen(s1 + 1);
  for (int i = 1; i <= m; i++) {
    if (s1[i] == '(' || s1[i] == ')') s[++n] = s1[i];
    if (s1[i] == '#') {
      s[++n] = ')';
      s[++n] = '#';
      cnt++;
    }
  }
  sum = 0;
  int now = cnt + 1;
  for (int i = n; i; i--) {
    if (s[i] == ')') {
      gang++;
    }
    if (s[i] == '(') {
      if (gang)
        gang--;
      else
        sum++;
    }
    if (s[i] == '#') {
      if (sum > 0) ans[now] = sum;
      sum = 0;
      now--;
    }
    if ((now > cnt) && (sum > 0)) exit(puts("-1"));
  }
  if (gang) exit(puts("-1"));
  ans[now] = sum;
  sum = 0;
  for (int i = 1; i <= cnt; i++) printf("%d\n", ans[i] + 1);
}
