#include <bits/stdc++.h>
using namespace std;
class C_ {};
template <typename T>
C_& operator<<(C_& __m, const T& __s) {
  if (!1) cerr << "\E[91m" << __s << "\E[0m";
  return __m;
}
C_ merr;
struct __s {
  __s() {
    if (1) {
      ios_base::Init i;
      cin.sync_with_stdio(0);
      cin.tie(0);
    }
  }
  ~__s() {
    merr << "Execution time: " << (double)clock() / CLOCKS_PER_SEC << " s.\n";
  }
} __S;
int main() {
  string s;
  int l = 0, r = 0;
  int cnt = 0;
  cin >> s;
  for (int i = 0; i < (int)s.size(); i++) {
    if (r > l) {
      cout << "-1" << '\n';
      return 0;
    }
    if (s[i] == '(') {
      l++;
    } else if (s[i] == ')') {
      r++;
    } else {
      r++;
      cnt++;
    }
    if (r > l) {
      cout << "-1" << '\n';
      return 0;
    }
  }
  int more = l - r;
  if (more) {
    int i;
    for (i = (int)s.size() - 1; i >= 0; i--) {
      if (s[i] == '(') {
        l--;
      } else if (s[i] == ')') {
        r--;
      } else {
        r += more;
        break;
      }
    }
    if (i < 0) {
      cout << "-1" << '\n';
      return 0;
    }
    i++;
    for (; i < (int)s.size(); i++) {
      if (r > l) {
        cout << "-1" << '\n';
        return 0;
      }
      if (s[i] == '(') {
        l++;
      } else if (s[i] == ')') {
        r++;
      }
      if (r > l) {
        cout << "-1" << '\n';
        return 0;
      }
    }
  }
  for (int i = 0; i < cnt - 1; i++) {
    cout << "1" << '\n';
  }
  cout << more + 1 << '\n';
  return 0;
}
