#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000009;
int rd() {
  char c = getchar();
  int t = 0, f = 1;
  while (!isdigit(c)) f = (c == '-') ? -1 : 1, c = getchar();
  while (isdigit(c)) t = t * 10 + c - 48, c = getchar();
  return t * f;
}
void wt(int x) {
  if (x < 0)
    putchar('-'), wt(-x);
  else {
    if (x > 9) wt(x / 10);
    putchar(x % 10 + 48);
  }
}
const int N = 100005;
char s[N];
int n, now, hv, cnt, Ans[N];
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (int i = ((int)1); i <= ((int)n); i++) {
    if (s[i] == '(')
      now++;
    else
      now--;
    if (now < 0) return puts("-1"), 0;
  }
  for (int i = ((int)1); i <= ((int)n); i++)
    if (s[i] == '#') Ans[++cnt] = now + 1, Ans[cnt - 1] = 1;
  hv = 0;
  now = 0;
  for (int i = ((int)1); i <= ((int)n); i++) {
    if (s[i] == '(') now++;
    if (s[i] == ')') now--;
    if (s[i] == '#') now -= Ans[++hv];
    if (now < 0) return puts("-1"), 0;
  }
  for (int i = ((int)1); i <= ((int)cnt); i++) printf("%d\n", Ans[i]);
  return 0;
}
