#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios_base::sync_with_stdio(false);
  cout.precision(20);
  string s;
  cin >> s;
  int n, cnt = 0, reqc = 0, x;
  n = s.length();
  for (int i = 0; i < n; i++) {
    if (s[i] == ')')
      cnt--;
    else if (s[i] == '(')
      cnt++;
    else if (s[i] == '#')
      reqc++;
    if (cnt < 0 or (cnt == 0 and s[i] == '#')) {
      cout << -1;
      return 0;
    }
  }
  vector<int> has;
  for (int i = 0; i < n; i++)
    if (s[i] == '#') {
      if (cnt <= 0) {
        cout << -1;
        return 0;
      }
      if (reqc == 1) {
        has.push_back(cnt);
        s.erase(s.begin() + i);
        for (int j = 0; j < cnt; j++) s.insert(s.begin() + i, ')');
        cnt = 0;
        break;
      } else {
        has.push_back(1);
        s.erase(s.begin() + i);
        s.insert(s.begin() + i, ')');
        cnt--;
      }
      reqc--;
    }
  cnt = 0;
  n = s.length();
  for (int i = 0; i < n; i++) {
    if (s[i] == ')')
      cnt--;
    else if (s[i] == '(')
      cnt++;
    else if (s[i] == '#')
      reqc++;
    if (cnt < 0 or (cnt == 0 and s[i] == '#')) {
      cout << -1;
      return 0;
    }
  }
  if (cnt != 0) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < has.size(); i++) cout << has[i] << endl;
}
