#include <bits/stdc++.h>
using namespace std;
template <class T>
T sqr(T x) {
  return x * x;
}
char s[110000];
int n;
vector<int> ans;
int main() {
  int i, sum, cnt, last, x;
  scanf("%s", s);
  n = strlen(s);
  sum = 1;
  for (i = 0; i < n; i++) {
    if (s[i] == '#') last = i, sum--;
    if (s[i] == '(') sum++;
    if (s[i] == ')') sum--;
  }
  if (sum < 1) return puts("-1"), 0;
  cnt = 0;
  for (i = 0; i < n; i++) {
    if (s[i] == '(') cnt++;
    if (s[i] == ')') cnt--;
    if (s[i] == '#') {
      if (i != last)
        x = 1;
      else
        x = sum;
      ans.push_back(x);
      cnt -= x;
    }
    if (cnt < 0) return puts("-1"), 0;
  }
  for (i = 0; i < ans.size(); i++) printf("%d\n", ans[i]);
}
