#include <bits/stdc++.h>
using namespace std;
char b[100001];
int main() {
  gets(b);
  int n = 0;
  while (b[n] != '\0') n++;
  int last = n - 1;
  while (b[last] != '#') last--;
  int s = 0;
  int r = 0;
  for (int i = 0; i < last; i++) {
    if (b[i] == '(')
      s++;
    else
      s--;
    if (s < 0) {
      cout << -1;
      return 0;
    }
    if (b[i] == '#') r++;
  }
  int rr = s;
  s = 0;
  for (int i = last + 1; i < n; i++) {
    if (b[i] == '(')
      s++;
    else
      s--;
    if (s < 0) {
      s = 0;
      rr--;
    }
  }
  if (s != 0) {
    cout << -1;
    return 0;
  }
  if (rr <= 0) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < r; i++) printf("1\n");
  printf("%d\n", rr);
  return 0;
}
