#include <bits/stdc++.h>
using namespace std;
string s;
int br_left, br_right, diff, n, br_h, currentdiff, num = 0, k;
int ans[100000];
void input() {
  cin >> s;
  n = s.size();
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      br_left++;
    else if (s[i] == ')')
      br_right++;
    else
      br_h++;
  }
  diff = br_left - br_right;
  k = br_h;
}
void solve() {
  if (diff < br_h)
    printf("-1\n");
  else {
    br_left = 0;
    br_right = 0;
    bool f = 1;
    int count = 0, i = 0;
    while (count < k) {
      while (s[i] != '#' && i < n) {
        if (s[i] == '(')
          br_left++;
        else if (s[i] == ')')
          br_right++;
        i++;
      }
      currentdiff = br_left - br_right;
      if (currentdiff <= 0) {
        f = 0;
        break;
      } else {
        br_h--;
        if (br_h == 0)
          ans[num] = diff;
        else {
          ans[num] = 1;
          diff--;
        }
        if (br_left - ans[num] - br_right < 0) {
          f = 0;
          break;
        }
        num++;
      }
      count++;
      i++;
    }
    if (!f)
      printf("-1\n");
    else {
      int p = 0;
      br_left = 0;
      br_right = 0;
      for (int i = 0; i < n; i++) {
        if (s[i] == '(')
          br_left++;
        else if (s[i] == ')')
          br_right++;
        else {
          br_right += ans[p];
          p++;
        }
        currentdiff = br_left - br_right;
        if (currentdiff < 0) {
          f = 0;
          break;
        }
      }
      if (f)
        for (int i = 0; i < num; i++) printf("%d\n", ans[i]);
      else
        printf("-1\n");
    }
  }
}
int main() {
  input();
  solve();
}
