#include <bits/stdc++.h>
using namespace std;
char s[300100], t[300100];
int l, lst = -1;
int ans[300100];
int main() {
  scanf("%s", s);
  l = strlen(s);
  int bal = 0;
  for (int i = 0; i < l; i++) {
    if (s[i] == '(') bal++;
    if (s[i] == ')') bal--;
    if (s[i] == '#') {
      s[i] = ')';
      ans[i] = 1;
      lst = i;
      bal--;
    }
  }
  for (int i = 0, j = 0; i < l; i++, j++) {
    if (i != lst) {
      t[j] = s[i];
    } else {
      ans[i] += max(bal, 0);
      t[j] = ')';
      j++;
      while (bal > 0) t[j] = ')', j++, bal--;
      j--;
    }
  }
  bal = 0;
  int l2 = strlen(t);
  for (int i = 0; i < l2; i++) {
    if (t[i] == '(') bal++;
    if (t[i] == ')') bal--;
    if (bal < 0) {
      cout << "-1\n";
      return 0;
    }
  }
  if (bal != 0) {
    cout << "-1\n";
    return 0;
  }
  for (int i = 0; i < l; i++)
    if (ans[i] != 0) printf("%d\n", ans[i]);
  return 0;
}
