#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const int maxn = 1e6 + 10;
string a;
int main() {
  int num = 0;
  cin >> a;
  int len = a.size();
  int n1 = 0, n2 = 0, last = 0, x = 0;
  for (int i = 0; i < len; i++) {
    if (a[i] == '(') {
      n1++;
    } else if (a[i] == ')') {
      n2++;
    } else {
      x++;
      last = i;
    }
  }
  int now = 0;
  for (int i = 0; i < len; i++) {
    if (a[i] == '(') {
      now++;
    } else if (a[i] == ')') {
      now--;
    } else {
      if (i != last) {
        now--;
      } else {
        now -= (n1 - n2 - x + 1);
      }
    }
    if (now < 0) {
      printf("-1\n");
      return 0;
    }
  }
  if (now != 0) {
    printf("-1\n");
  } else {
    if (n1 - n2 - x + 1 <= 0) {
      printf("-1\n");
      return 0;
    }
    for (int i = 1; i < x; i++) {
      printf("1\n");
    }
    printf("%d", n1 - n2 - x + 1);
  }
  return 0;
}
