#include <bits/stdc++.h>
using namespace std;
int a[1000005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  int cnt = 0, idx = 0, last = 0, val = 0, cnt1 = 0;
  for (int i = 0; i < s.size();) {
    if (cnt < 0) break;
    if (s[i] == '(') {
      cnt++;
      i++;
      continue;
    }
    if (s[i] == ')') {
      cnt--;
      i++;
      continue;
    }
    if (s[i] == '#') {
      i++;
      val = cnt;
      last = i;
      cnt--;
      a[idx++] = 1;
    }
  }
  if (cnt < 0) {
    cout << "-1";
    return 0;
  }
  int x = val;
  for (int i = last; i < s.size(); i++) {
    if (s[i] == ')')
      val--;
    else
      val++;
  }
  while (last < s.size() && s[last] == ')') last++, cnt1++;
  if (val + cnt1 > x) {
    cout << "-1";
    return 0;
  }
  a[idx - 1] = val;
  for (int i = 0; i < idx; i++) cout << a[i] << endl;
  return 0;
}
