#include <bits/stdc++.h>
int main() {
  char huruf[100010];
  int panjang, temp = 0, jawab = 0, hasil, counter = 0, temp2 = 0;
  scanf("%s", huruf);
  getchar();
  panjang = strlen(huruf);
  for (int i = 0; i < panjang; i++) {
    if (temp == 0 && huruf[i] == ')' || temp == 0 && huruf[i] == '#') {
      temp = 0;
      break;
    }
    if (huruf[i] == '(') {
      temp += 1;
      temp2 += 1;
      counter += 1;
    } else if (huruf[i] == '#') {
      jawab += 1;
      temp2 -= 1;
      counter = 0;
    } else {
      temp -= 1;
      temp2 -= 1;
      counter -= 1;
    }
    if (temp2 < 0) {
      temp = 0;
      break;
    }
    if (huruf[panjang - 1] == '(') {
      temp = 0;
      break;
    }
  }
  if (temp == 0 || counter > 0) {
    printf("-1");
  } else {
    for (int i = 0; i < jawab; i++) {
      if (i == jawab - 1) {
        printf("%d", temp);
      } else {
        printf("1\n");
        temp--;
      }
    }
  }
}
