#include <bits/stdc++.h>
using namespace std;
vector<int> g;
int main() {
  int c = 0;
  string s;
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == ')') c--;
    if (s[i] == '(') c++;
    if (s[i] == '#') {
      g.push_back(1);
      c--;
    }
  }
  if (c < 0) {
    cout << -1 << endl;
    return 0;
  }
  g[g.size() - 1] += c;
  c = 0;
  for (int i = 0, j = 0; i < s.length(); i++) {
    if (s[i] == '#') {
      c -= g[j];
      j++;
    } else if (s[i] == '(')
      c++;
    else if (s[i] == ')')
      c--;
    if (c < 0) {
      cout << -1;
      return 0;
    }
  }
  for (int i = 0; i < g.size(); i++) cout << g[i] << endl;
  return 0;
}
