#include <bits/stdc++.h>
using namespace std;
inline const int getint() {
  int r = 0, k = 1;
  char c = getchar();
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') k = -1;
  for (; c >= '0' && c <= '9'; c = getchar()) r = r * 10 + c - '0';
  return k * r;
}
const int N = 1e5 + 10;
char s[N];
int n;
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  int sum = 0, x = 0, y = 0, z = 0, need = 0;
  for (int i = (1); i <= (n); ++i)
    if (s[i] == '(')
      ++x;
    else if (s[i] == ')')
      ++y;
    else
      ++z;
  need = x - y - (z - 1);
  if (need <= 0 && z) {
    puts("-1");
    return 0;
  }
  int now = z;
  for (int i = (n); i >= (1); --i) {
    if (s[i] == '(')
      ++sum;
    else if (s[i] == ')')
      --sum;
    else {
      if (now == z) {
        sum -= need;
      } else {
        sum--;
      }
      --now;
    }
    if (sum > 0) {
      puts("-1");
      return 0;
    }
  }
  if (sum != 0) {
    puts("-1");
    return 0;
  }
  now = 0;
  for (int i = (1); i <= (n); ++i) {
    if (s[i] == '#') {
      ++now;
      if (now == z)
        printf("%d\n", need);
      else
        puts("1");
    }
  }
  return 0;
}
