#include <bits/stdc++.h>
using namespace std;
template <typename Tp>
inline void read(Tp &x) {
  x = 0;
  bool neg = false;
  char c = getchar();
  for (; !isdigit(c); c = getchar()) {
    if (c == '-') {
      neg = true;
    }
  }
  for (; isdigit(c); c = getchar()) {
    x = x * 10 + c - '0';
  }
  if (neg) {
    x = -x;
  }
}
const int N = 1e5 + 5;
char str[N];
int main() {
  scanf("%s", str);
  int n = strlen(str), cur = 0, sharp = 0, last = -1;
  for (int i = 0; i < n; ++i) {
    if (str[i] == '(') {
      ++cur;
    } else if (str[i] == ')') {
      --cur;
    } else if (str[i] == '#') {
      --cur;
      ++sharp;
      last = i;
    }
    if (cur < 0) {
      puts("-1");
      return 0;
    }
  }
  int match = 0;
  for (int i = last + 1; i < n; ++i) {
    if (str[i] == '(') {
      ++match;
    } else if (str[i] == ')') {
      --match;
      if (match < 0) {
        match = 0;
      }
    }
  }
  if (match > 0) {
    puts("-1");
    return 0;
  }
  for (int i = 1; i < sharp; ++i) {
    puts("1");
  }
  printf("%d\n", cur + 1);
  return 0;
}
