#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1, T2> a) {
  return (out << "(" << a.first << "; " << a.second << ")");
}
const int nmax = 1000 * 1000;
const int inf = 1000 * 1000 * 1000;
const int mod = 1000 * 1000 * 1000 + 7;
const int pi = M_PI;
const long long infl = 1000ll * 1000ll * 1000ll * 1000ll * 1000ll * 1000ll;
string s;
int q[nmax];
vector<int> answer;
int main() {
  getline(cin, s);
  int ind = inf;
  for (int i = 0; i < (int)s.length(); i++)
    if (s[i] == '#') ind = i;
  int c = 0;
  for (int i = 0; i < min((int)s.length(), ind); i++) {
    if (s[i] == '#') answer.push_back(1);
    if (s[i] == '(')
      c++;
    else
      c--;
    if (c < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  int c1 = 0;
  for (int i = ind; i < (int)s.length(); i++)
    if (s[i] == ')')
      c1++;
    else if (s[i] == '(')
      c1--;
  if (c < c1 + 1) {
    cout << -1 << endl;
    return 0;
  }
  answer.push_back(c - c1);
  ind = 0, c = 0;
  for (int i = 0; i < (int)s.length(); i++) {
    if (s[i] == '(')
      c++;
    else if (s[i] == ')')
      c--;
    else
      c -= answer[ind++];
    if (c < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  if (c != 0) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < (int)answer.size(); i++) cout << answer[i] << endl;
}
