#include <bits/stdc++.h>
using namespace std;
char S[110000];
int L;
int main() {
  scanf("%s", S + 1);
  L = strlen(S + 1);
  int t = 0, la;
  for (int i = 1; i <= L; ++i) {
    if (S[i] == '#') {
      t++;
      la = i;
    }
  }
  if (t > 1) {
    for (int i = 1; i <= la - 1; ++i) {
      if (S[i] == '#') S[i] = ')';
    }
  }
  int t1 = 0, flag = 0;
  for (int i = 1; i <= la - 1; ++i) {
    if (S[i] == '(')
      t1++;
    else
      t1--;
    if (t1 < 0) flag = 1;
  }
  int t2 = 0;
  for (int i = L; i >= la + 1; --i) {
    if (S[i] == ')')
      t2++;
    else
      t2--;
    if (t2 < 0) flag = 1;
  }
  if (flag || t1 <= t2)
    puts("-1");
  else {
    for (int i = 1; i <= t - 1; ++i) puts("1");
    printf("%d\n", t1 - t2);
  }
  return 0;
}
