#include <bits/stdc++.h>
using namespace std;
char a[100010];
int ans[100010], len = 0, num[100010];
int main() {
  scanf("%s", a);
  int n = strlen(a);
  int l = 0, r = 0;
  int tmp = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (a[i] == '(') tmp--;
    if (a[i] == ')' || a[i] == '#') tmp++;
    num[i] = tmp;
    if (tmp < 0) tmp = 0;
  }
  len = 0;
  for (int i = 0; i < n; i++) {
    if (l < r) {
      puts("-1");
      return 0;
    }
    if (a[i] == '(') l++;
    if (a[i] == ')') r++;
    if (a[i] == '#') {
      ans[len++] = l - r - num[i];
      r += ans[len - 1] + 1;
    }
  }
  if (l != r) {
    puts("-1");
    return 0;
  }
  for (int i = 0; i < len; i++) {
    if (ans[i] + 1 <= 0) {
      puts("-1");
      return 0;
    }
  }
  for (int i = 0; i < len; i++) {
    printf("%d\n", ans[i] + 1);
  }
  return 0;
}
