#include <bits/stdc++.h>
using namespace std;
string st;
int sz, total, last, pos;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> st;
  sz = st.size();
  for (int i = 0; i < sz; i++) {
    total += st[i] == '(' ? 1 : -1;
    if (st[i] == '#') pos = i;
  }
  if (total < 0) {
    cout << "-1\n";
    return 0;
  }
  last = 1 + total;
  total = 0;
  for (int i = 0; i < sz; i++) {
    total += (i == pos) ? -last : (st[i] == '(' ? 1 : -1);
    if (total < 0) {
      cout << "-1\n";
      return 0;
    }
  }
  for (int i = 0; i < sz; i++) {
    if (st[i] == '#')
      if (i == pos)
        cout << last << "\n";
      else
        cout << "1\n";
  }
  return 0;
}
