#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1000000007;
const int INF = 2147483647;
vector<int> solve(string& s) {
  int n, i, j, a, b;
  n = s.size();
  a = b = 0;
  j = -1;
  vector<int> ans;
  for (i = n - 1; i >= 0; --i) {
    if (s[i] == '(') {
      ++b;
    } else if (s[i] == ')') {
      --b;
    } else {
      j = i;
      break;
    }
    if (b > 0) return ans;
  }
  for (i = 0; i < j; ++i) {
    if (s[i] == '#') {
      s[i] = ')';
      ans.push_back(1);
    }
  }
  for (i = 0; i <= j; ++i) {
    if (s[i] == '(') {
      ++a;
    } else if (s[i] == ')') {
      --a;
    } else {
      a += b;
      if (a < 1) {
        a = 1;
        break;
      }
      ans.push_back(a);
      a = 0;
    }
    if (a < 0) break;
  }
  if (a) ans.clear();
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  cin >> s;
  vector<int> ans = solve(s);
  if (ans.empty()) cout << -1 << "\n";
  for (auto x : ans) cout << x << "\n";
  return 0;
}
