#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int a = 0, b = 0, c = 0, ans, last, n = s.size();
  for (int i = 0; i < n; i++) {
    if (s[i] == '#') {
      c++;
      last = i;
    }
  }
  for (int i = 0; i < last; i++) {
    if (s[i] == '#') s[i] = ')';
  }
  for (int i = 0; i <= last; i++) {
    if (s[i] == '(') a++;
    if (s[i] == ')') b++;
  }
  int sum = 0, flag = 0;
  for (int i = last + 1; i < n; i++) {
    if (s[i] == ')') {
      sum++;
      flag = 0;
    }
    if (s[i] == '(') {
      sum--;
      flag = 1;
    }
  }
  if (sum < 0 || flag) {
    cout << -1;
    return 0;
  }
  ans = a - b;
  ans -= sum;
  if (ans <= 0) {
    cout << "-1";
    return 0;
  }
  s[last] = ')';
  s.insert(last, ans - 1, ')');
  sum = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(') sum++;
    if (s[i] == ')') sum--;
    if (sum < 0) {
      cout << -1;
      return 0;
    }
  }
  c--;
  while (c--) cout << "1" << endl;
  cout << ans;
  return 0;
}
