#include <bits/stdc++.h>
using namespace std;
stack<long long int> q;
int main() {
  long long int open = 0, count = 0, rcount = 0, i;
  string str;
  cin >> str;
  for (i = 0; i < str.length(); i++) {
    if (str[i] == '(')
      open++;
    else if (str[i] == ')') {
      if (open != 0)
        open--;
      else
        count--;
    }
    if (str[i] == '#') {
      count += open - 1;
      open = 0;
      rcount++;
    }
    if (count < 0) {
      cout << -1;
      return 0;
    }
  }
  if (open > 0) {
    cout << -1;
    return 0;
  }
  for (i = 0; i < rcount - 1; i++) cout << "1 ";
  cout << count + 1;
  return 0;
}
