#include <bits/stdc++.h>
using namespace std;
int main() {
  string ss, s;
  while (cin >> ss) {
    long c = 0, k = 0, d = 0, a[100010] = {0}, l, cc = 0, dd = 0, mm = 0, ww;
    l = ss.size();
    stack<char> x;
    char ch;
    for (int i = 0; i < l; i++) {
      if (ss[i] != ')')
        x.push(ss[i]);
      else {
        if (!x.empty()) {
          ch = x.top();
          if (ch == '(')
            x.pop();
          else {
            x.push(ss[i]);
          }
        } else {
          x.push(ss[i]);
        }
      }
    }
    while (!x.empty()) {
      ch = x.top();
      s += ch;
      x.pop();
    }
    reverse(s.begin(), s.end());
    l = s.size();
    for (int i = 0; i < l; i++) {
      if (s[i] == '#') c++;
      if (s[i] == '(') k++;
      if (s[i] == ')') d++;
    }
    if (k < c + d || s[l - 1] == '(' || s[0] == ')' || s[0] == '#') {
      cout << "-1\n";
      continue;
    }
    k = k - d;
    for (int i = 0; i < l; i++) {
      if (s[i] == '#' && c > 1) {
        cout << 1 << "\n";
        c--;
        k--;
      } else if (s[i] == '#') {
        cout << k << "\n";
      }
    }
  }
  return 0;
}
