#include <bits/stdc++.h>
using namespace std;
char a[100100];
int main() {
  scanf("%s", a);
  int en;
  int len = strlen(a);
  int r = 0, l = 0;
  int ll, rr;
  int flag = 0;
  int last;
  int cnt = 0;
  for (int i = 0; a[i] != '\0'; i++)
    if (a[i] == '#') en = i;
  for (int i = 0; i < len; i++) {
    if (a[i] == '(')
      l++;
    else {
      r++;
      if (a[i] == '#') cnt++;
    }
    if (r > l) {
      flag = 1;
      break;
    }
    if (i == en) ll = l, rr = r;
  }
  last = l - r + 1;
  rr += last - 1;
  if (ll < rr) flag = 1;
  for (int i = en + 1; i < len; i++) {
    if (a[i] == '(')
      ll++;
    else
      rr++;
    if (rr > ll) {
      flag = 1;
      break;
    }
  }
  if (rr != ll) flag = 1;
  if (flag)
    puts("-1");
  else {
    for (int i = 0; i < cnt - 1; i++) puts("1");
    printf("%d\n", last);
  }
}
