#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const double eps = 1e-10;
int main() {
  char s[100005];
  int p[100005];
  while (scanf("%s", s) != EOF) {
    int len = strlen(s), cnt = 0, x = 0, y = 0;
    for (int i = 0; i < len; i++) {
      if (s[i] == '#') p[cnt++] = 1, y++;
      if (s[i] == ')') y++;
      if (s[i] == '(') x++;
    }
    if (y > x)
      puts("-1");
    else {
      bool ok = 0;
      int num = 0, v = cnt, w = 0;
      for (int i = len - 1; i >= 0; i--) {
        if (s[i] == '(') num++;
        if (s[i] == ')') num--;
        if (num > 0 && w > 0) p[v]++, num--;
        if (num > 0 && w == 0) {
          ok = 1;
          break;
        }
        if (s[i] == '#') v--, w = 1, num--;
      }
      if (ok || num < 0)
        puts("-1");
      else {
        for (int i = 0; i < cnt; i++) printf("%d\n", p[i]);
      }
    }
  }
  return 0;
}
