#include <bits/stdc++.h>
using namespace std;
int ans[100010];
string str;
int last;
int tot, cnt;
int n;
int lft, rht;
int main(void) {
  ios_base::sync_with_stdio(0);
  cin >> str;
  n = str.size();
  for (int i = 0; i <= n - 1; i++)
    if ('#' == str[i]) {
      ++tot;
      last = i;
    }
  for (int i = n - 1; i > last; i--) {
    if (')' == str[i])
      ++rht;
    else
      --rht;
    if (rht < 0) goto fail;
  }
  for (int i = 0; i <= last; i++) {
    if ('(' == str[i])
      ++lft;
    else if (')' == str[i])
      --lft;
    else {
      if (cnt != tot - 1) {
        ans[cnt] = 1;
        --lft;
      } else {
        lft -= rht;
        if (lft >= 1) {
          ans[cnt] = lft;
          goto success;
        } else
          goto fail;
      }
      ++cnt;
    }
    if (lft < 0) goto fail;
  }
success:
  for (int i = 0; i < tot; i++) cout << ans[i] << "\n";
  return 0;
fail:
  cout << "-1\n";
  return 0;
}
