#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  string second;
  cin >> second;
  vector<int> v;
  int t = 0, idx = -1;
  for (int i = 0; i < (int)second.size(); i++) {
    if (second[i] == '(') t++;
    if (second[i] == '#') {
      if (t > 0) {
        v.push_back(t);
        t = 0;
        idx = max(idx, 0);
      } else {
        if (idx == -1 || idx >= (int)v.size()) {
          cout << -1 << endl;
          return 0;
        }
        while (idx < (int)v.size()) {
          if (v[idx] > 1) {
            v[idx]--;
            v.push_back(1);
            break;
          }
          idx++;
        }
        if (idx >= (int)v.size()) {
          cout << -1 << endl;
          return 0;
        }
      }
    }
    if (second[i] == ')') {
      if (t > 0) {
        t--;
        continue;
      }
      if (idx == -1 || idx >= (int)v.size()) {
        cout << -1 << endl;
        return 0;
      }
      while (idx < (int)v.size()) {
        if (v[idx] > 1) {
          v[idx]--;
          break;
        }
        idx++;
      }
      if (idx >= (int)v.size()) {
        cout << -1 << endl;
        return 0;
      }
    }
  }
  if (t > 0) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < (int)v.size(); i++) cout << v[i] << "\n";
  return 0;
}
