#include <bits/stdc++.h>
using namespace std;
char s[100010];
int f1[100010], f2[100010], ans[100010];
int main() {
  int n, m, last, t1, t2, t;
  bool flag;
  while (gets(s)) {
    memset(f1, 0, sizeof(f1));
    memset(f2, 0, sizeof(f2));
    n = strlen(s);
    last = -1;
    flag = true;
    m = 0;
    t1 = t2 = 0;
    for (int i = n - 1; i >= 0; i--) {
      if (s[i] == '#') {
        last = i;
        break;
      }
      if (s[i] == ')') t1++;
    }
    for (int i = 0; i < n; i++)
      if (s[i] == '(') t2++;
    t = t2 - t1;
    if (t <= 0) {
      printf("-1\n");
      continue;
    }
    if (last == 0) {
      printf("\n");
      continue;
    }
    for (int i = 1; i <= n; i++) {
      if (s[i - 1] == '(')
        f1[i] = f1[i - 1] + 1;
      else
        f1[i] = f1[i - 1];
      if (s[i - 1] == ')')
        f2[i] = f2[i - 1] + 1;
      else
        f2[i] = f2[i - 1];
      if (s[i - 1] == '#') {
        if (i == last + 1) {
          if (f1[i] == f2[i]) {
            ans[++m] = 1;
            f2[i]++;
          } else {
            ans[++m] = t - f2[i];
            f2[i] = t;
          }
        } else {
          ans[++m] = 1;
          f2[i]++;
        }
      }
      if (f1[i] < f2[i]) {
        flag = false;
        break;
      }
    }
    if (!flag) {
      printf("-1\n");
    } else {
      for (int i = 1; i <= m; i++) printf("%d\n", ans[i]);
    }
  }
  return 0;
}
