#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const long long llinf = (long long)3e18;
const int N = (int)1e5 + 111;
const long double PI = (long double)acos(-1);
int main() {
  string s;
  cin >> s;
  bool ok = true;
  int n = s.length(), k = 0, cur = 0;
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    if (s[i] == '#') {
      ans.push_back(1);
      cur--;
      k++;
    }
    if (s[i] == '(') cur++;
    if (s[i] == ')') cur--;
  }
  if (cur >= 0) ans[k - 1] += cur;
  k = 0;
  cur = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '#') cur -= ans[k++];
    if (s[i] == '(') cur++;
    if (s[i] == ')') cur--;
    if (cur < 0) ok = false;
  }
  if (cur != 0) ok = false;
  if (ok) {
    for (int i = 0; i < k; i++) cout << ans[i] << endl;
  } else
    cout << -1;
  return 0;
}
