#include <bits/stdc++.h>
using namespace std;
char s[100010];
int ans[100010], top, last;
int main() {
  scanf("%s", s);
  int len = strlen(s);
  top = 0;
  int g = 0;
  for (int i = len - 1; i >= 0; i--) {
    if (s[i] == '(')
      g--;
    else if (s[i] == ')')
      g++;
    else {
      last = i;
      break;
    }
    if (g < 0) {
      top = -1;
      break;
    }
  }
  if (top < 0) {
    puts("-1");
    return 0;
  }
  int f = 0;
  for (int i = 0; i < len; i++) {
    if (s[i] == '(')
      f++;
    else if (s[i] == ')')
      f--;
    else {
      if (i != last) {
        f--;
        ans[top++] = 1;
      } else {
        if (f > g) {
          ans[top++] = f - g;
          f = g;
        } else {
          top = -1;
          break;
        }
      }
    }
    if (f < 0) {
      top = -1;
      break;
    }
  }
  if (f != 0) top = -1;
  if (top < 0)
    puts("-1");
  else {
    for (int i = 0; i < top; i++) printf("%d\n", ans[i]);
  }
  return 0;
}
