#include <bits/stdc++.h>
int main() {
  char c;
  unsigned x = 0, y = 0, min = -1;
  while ((c = getchar()) > ' ') {
    if (c == '#') {
      ++y;
      min = -1;
    }
    if (c == '(')
      ++x;
    else {
      if (x == 0) {
        printf("-1\n");
        return 0;
      }
      --x;
    }
    if (min > x) min = x;
  }
  if (x != min) {
    printf("-1\n");
    return 0;
  }
  while (--y) printf("1\n");
  printf("%u\n", x + 1);
  return 0;
}
