#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin >> s;
  int num = count(s.begin(), s.end(), '#');
  vector<int> A(s.size());
  int cur = 0;
  for (int i = 0; i < s.size(); ++i) {
    char c = s[i];
    if (c == '(')
      ++cur, A[i] = 1;
    else
      --cur, A[i] = -1;
    if (cur < 0) cout << -1 << '\n', exit(0);
  }
  A[s.size() - 1 - (find(s.rbegin(), s.rend(), '#') - s.rbegin())] -= cur;
  for (int now = 0, i = 0; i < s.size(); ++i) {
    now += A[i];
    if (now < 0) cout << -1 << '\n', exit(0);
  }
  while (num--) cout << (num ? 1 : 1 + cur) << '\n';
}
