#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int MAX = 1e9 + 5;
int n, m, need, ans[N], t;
string str;
bool ctr() {
  int need = 0;
  for (int i = 1; i <= n; i++) {
    if (need < 0) return false;
    if (str[i] == '(') need++;
    if (need < 0) return false;
    if (str[i] == ')')
      need--;
    else
      need -= ans[i];
    if (need < 0) return false;
  }
  return !need;
}
int main() {
  cin >> str;
  n = str.size();
  str = '0' + str;
  for (int i = 1; i <= n; i++)
    if (str[i] == '#') {
      ans[i] = 1;
      t++;
    }
  for (int i = n; i >= 1; i--)
    if (str[i] == '#') {
      need = 0;
      for (int j = 1; j <= n; j++)
        if (str[j] == '(')
          need++;
        else if (str[j] == ')')
          need--;
      ans[i] = need - t + 1;
      if (need <= 0 || !ctr())
        cout << "-1" << '\n';
      else
        for (int j = 1; j <= n; j++)
          if (str[j] == '#') cout << ans[j] << '\n';
      return 0;
    }
  return 0;
}
