#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 5;
const int INF = 1000000;
char s[N];
int ans[N];
int main() {
  scanf("%s", s);
  int n = strlen(s);
  int nsh = 0;
  for (int i = 0; i < n; i++)
    if (s[i] == '#') ans[nsh++] = 1;
  int cur = 0, idx = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      cur++;
    else if (s[i] == ')')
      cur--;
    else {
      if (idx == nsh - 1) {
        int need = cur;
        i++;
        while (i < n) {
          if (s[i] == ')')
            need--;
          else if (s[i] == '(')
            need++;
          i++;
        }
        ans[idx] = max(1, need);
        break;
      } else
        cur--;
      idx++;
    }
  }
  cur = 0, idx = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      cur++;
    else if (s[i] == ')')
      cur--;
    else
      cur -= ans[idx++];
    if (cur < 0) {
      printf("-1\n");
      return 0;
    }
  }
  for (int i = 0; i < nsh; i++) printf("%d\n", ans[i]);
  return 0;
}
