#include <bits/stdc++.h>
using namespace std;
const int MAGIC = 300;
string s;
int main() {
  cin >> s;
  int last = -1;
  int a = 0;
  int sharp = 0;
  for (int i = 0; i < s.length(); ++i) {
    switch (s[i]) {
      case '(':
        a++;
        break;
      case '#':
        last = i;
        ++sharp;
      case ')':
        --a;
    }
    if (a < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  int b = 0;
  for (int i = 0; i < s.length(); ++i) {
    switch (s[i]) {
      case '(':
        b++;
        break;
      case '#':
        last == i ? b -= a + 1 : --b;
        break;
      case ')':
        --b;
    }
    if (b < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  for (int i = 0; i < sharp - 1; ++i) cout << 1 << endl;
  cout << a + 1 << endl;
  return 0;
}
