#include <bits/stdc++.h>
char s[100005];
int a[100005], b[100005];
int ans[100005];
int main() {
  int tot = 0, totr = 0, i;
  scanf("%s", s);
  int l = strlen(s);
  for (i = 0; i < l; i++) {
    if (s[i] == '#')
      a[++tot] = i;
    else if (s[i] == '(')
      b[++totr] = i;
    else {
      if (totr == 0) {
        printf("-1\n");
        return 0;
      } else
        totr--;
    }
  }
  int w = 0;
  while (tot > 0) {
    int sum = 0;
    if (totr == 0 || a[tot] < b[totr]) {
      printf("-1\n");
      return 0;
    }
    totr--;
    sum++;
    while (totr >= 1 && b[totr] >= a[tot - 1]) {
      totr--;
      sum++;
    }
    ans[w++] = sum;
    tot--;
  }
  for (i = w - 1; i >= 0; i--) printf("%d\n", ans[i]);
}
