#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
int a[100100];
int main() {
  string s;
  cin >> s;
  int cur = 0;
  int pos = -1;
  for (int _n((s.size()) - 1), i(0); i <= _n; ++i) {
    if (s[i] == '(')
      cur++, a[i]++;
    else if (s[i] == ')')
      cur--, a[i]--;
    else {
      pos = i;
      cur--;
      a[i]--;
    }
    if (cur < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  if (pos + 1) a[pos] -= cur;
  int balance = 0;
  for (int _n((s.size()) - 1), i(0); i <= _n; ++i) {
    balance += a[i];
    if (balance < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  if (balance) {
    cout << -1 << endl;
    return 0;
  }
  for (int _n((s.size()) - 1), i(0); i <= _n; ++i)
    if (s[i] == '#') cout << -a[i] << '\n';
  return 0;
}
