#include <bits/stdc++.h>
using namespace std;
void RI() {}
template <typename... T>
void RI(int& head, T&... tail) {
  scanf("%d", &head);
  RI(tail...);
}
char s[100010];
int main() {
  int n = strlen(gets(s));
  int last = -1;
  int zz = 0;
  for (int i = 0; i < int(n); i++)
    if (s[i] == '#') {
      zz++;
      s[i] = ')';
      last = i;
    }
  int cl = count(s, s + n, '(');
  int cr = count(s, s + n, ')');
  if (cr > cl) return puts("-1"), 0;
  int cnt = 0;
  for (int i = 0; i < int(n); i++) {
    if (s[i] == '(')
      cnt++;
    else
      cnt--;
    if (i == last) cnt -= cl - cr;
    if (cnt < 0) return puts("-1"), 0;
  }
  if (cnt != 0) return puts("-1"), 0;
  for (int i = 0; i < int(zz - 1); i++) puts("1");
  printf("%d\n", cl - cr + 1);
  return 0;
}
