#include <bits/stdc++.h>
using namespace std;
int main(void) {
  char str[100010];
  scanf("%s", str);
  int length = strlen(str);
  vector<int> jml;
  int tot = 0;
  for (int i = 0; i < length; i++) {
    if (str[i] == '#' || str[i] == ')') {
      tot--;
      if (str[i] == '#') jml.push_back(tot);
    } else {
      tot++;
    }
    if (tot < 0) {
      printf("-1");
      return 0;
    }
  }
  vector<int> ans;
  for (int i = 0; i < jml.size() - 1; i++) {
    ans.push_back(1);
  }
  ans.push_back(1 + tot);
  int totz = 0;
  int j = length - 1;
  while (str[j] != '#') {
    if (str[j] == '(')
      totz++;
    else
      totz--;
    j--;
    if (totz > 0) {
      printf("-1");
      return 0;
    }
  }
  for (int i = 0; i < ans.size(); i++) {
    printf("%d\n", ans[i]);
  }
  return 0;
}
