#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const long long INFll = 1000000000000000000ll;
const int MOD = 1000000007;
char s[100100];
int ans[100100];
int main() {
  gets(s);
  int n = strlen(s);
  int op = 0, cl = 0, k = 0;
  for (int i = 0; i < n; ++i)
    if (s[i] == '(')
      ++op;
    else {
      ++cl;
      if (s[i] == '#') ++k;
    }
  int bal = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(')
      ++bal;
    else
      --bal;
    if (bal < 0) {
      puts("-1");
      return 0;
    }
  }
  for (int i = 0; i < k - 1; ++i) ans[i] = 1;
  ans[k - 1] = op - cl + 1;
  k = bal = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(')
      ++bal;
    else if (s[i] == ')')
      --bal;
    else
      bal -= ans[k++];
    if (bal < 0) {
      puts("-1");
      return 0;
    }
  }
  for (int i = 0; i < k; ++i) printf("%d\n", ans[i]);
  return 0;
}
