#include <bits/stdc++.h>
using namespace std;
char a[100010];
int main() {
  scanf("%s", a);
  int n = strlen(a);
  int m = 0;
  int count = 0;
  for (int i = (n - 1); i >= (0); --i) {
    if (a[i] == '#')
      break;
    else if (a[i] == '(')
      count++;
    else
      count--;
    if (count > 0) {
      printf("-1\n");
      return 0;
    }
  }
  count = 0;
  for (int i = 0; i < (n); ++i)
    if (a[i] == '#') a[i] = ')', m++;
  bool flag = true;
  for (int i = 0; i < (n); ++i) {
    if (a[i] == '(')
      count++;
    else
      count--;
    if (count < 0) {
      flag = false;
      break;
    }
  }
  if (!flag) {
    printf("-1\n");
    return 0;
  }
  for (int i = (1); i <= (m - 1); ++i) printf("1\n");
  printf("%d\n", 1 + count);
  return 0;
}
