#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
const long long MOD = 1e9 + 7;
int N, M, K, Q, T;
char str[MAXN];
int main() {
  int i, j;
  scanf("%s", str);
  N = 0;
  while (str[N] != 0) ++N;
  stack<int> stk;
  int cnt = 0;
  int idx = 0;
  for (i = 0; i < N; ++i) {
    if (str[i] == '(')
      stk.push(i);
    else {
      if (stk.empty()) {
        printf("-1");
        return 0;
      }
      stk.pop();
      if (str[i] == '#') {
        ++cnt;
        idx = i;
      }
    }
  }
  if (!stk.empty() && idx < stk.top()) {
    printf("-1");
    return 0;
  }
  for (i = 1; i < cnt; ++i) {
    printf("1\n");
  }
  printf("%d\n", 1 + stk.size());
  return 0;
}
