#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 1;
string s;
long long i, j, n, o, c, h;
long long C[N], temp;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> s;
  n = (long long)(s.size());
  vector<int> ans;
  for (i = 0; i < n; ++i) {
    if (s[i] == '(')
      ++o;
    else if (s[i] == ')')
      ++c;
    else
      ++h;
  }
  temp = o - c;
  if (temp < 0) {
    cout << -1;
    return 0;
  }
  for (i = 0; i < n; ++i) {
    if (s[i] == '#') {
      if (temp <= 0) {
        cout << -1;
        return 0;
      }
      if (h == 1) {
        C[i] = temp;
        ans.push_back(temp);
        temp = 0;
      } else {
        C[i] = 1;
        ans.push_back(1);
        --temp;
      }
      --h;
    }
  }
  o = c = 0;
  for (i = 0; i < n; ++i) {
    if (s[i] == '(')
      ++o;
    else if (s[i] == ')')
      ++c;
    else if (s[i] == '#')
      c += C[i];
    if (c > o || (i == n && o != c)) {
      cout << -1;
      return 0;
    }
  }
  for (auto u : ans) cout << u << "\n";
  return 0;
}
