#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100000;
char s[MAX_N + 4];
int cs[MAX_N];
int main() {
  scanf("%s", s);
  int n = strlen(s);
  int p = 0, m = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      p++;
    else {
      p--;
      if (p < 0) {
        puts("-1");
        return 0;
      }
      if (s[i] == '#') cs[m++] = 1;
    }
  }
  cs[m - 1] += p;
  for (int i = 0, j = 0, p = 0; i < n; i++) {
    if (s[i] == '(')
      p++;
    else {
      p -= (s[i] == '#') ? cs[j++] : 1;
      if (p < 0) {
        puts("-1");
        return 0;
      }
    }
  }
  for (int i = 0; i < m; i++) printf("%d\n", cs[i]);
  return 0;
}
