#include <bits/stdc++.h>
using namespace std;
string s;
vector<int> v;
int main() {
  cin >> s;
  int n = s.length();
  int last = -1;
  for (int i = 0; i < n; i++)
    if (s[i] == '#') {
      v.push_back(1);
      last = i;
    }
  bool good = 1;
  int tmp = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == ')') {
      tmp++;
    } else if (s[i] == '(') {
      tmp--;
      if (tmp == -1) {
        if (i > last) {
          good = 0;
          break;
        }
        v.back()++;
        tmp++;
      }
    } else {
      tmp++;
    }
  }
  if (!good || tmp > 0)
    cout << -1 << endl;
  else
    for (int i = 0; i < v.size(); i++) cout << v[i] << "\n";
  return 0;
}
