#include <bits/stdc++.h>
using namespace std;
const int N = 100004;
char s[N];
vector<int> vec;
int main() {
  scanf("%s", s + 1);
  int n = strlen(s + 1);
  int sum = 0;
  int pos;
  int i;
  for (i = 1; i <= n; i++)
    if (s[i] == '#') pos = i;
  for (i = 1; i <= n; i++) {
    if (sum < 0) {
      printf("-1\n");
      return 0;
    }
    if (s[i] == '(')
      sum++;
    else if (s[i] == ')')
      sum--;
    else {
      if (i != pos) {
        sum--;
        vec.push_back(1);
      }
    }
  }
  if (sum <= 0) {
    printf("-1\n");
    return 0;
  } else {
    int val = sum;
    vec.push_back(sum);
    sum = 0;
    for (i = 1; i <= n; i++) {
      if (sum < 0) {
        printf("-1\n");
        return 0;
      }
      if (s[i] == '(')
        sum++;
      else if (s[i] == ')')
        sum--;
      else {
        if (i != pos)
          sum--;
        else
          sum = sum - val;
      }
    }
    if (sum != 0) {
      printf("-1\n");
      return 0;
    }
    for (i = 0; i < vec.size(); i++) printf("%d\n", vec[i]);
  }
  return 0;
}
