#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int INF = 0x7f7f7f7f;
const long double eps = 1e-9;
const int maxn = 1010;
int main() {
  ios_base::sync_with_stdio(false);
  string s;
  cin >> s;
  int o, c, sharp;
  o = c = sharp = 0;
  int idx;
  for (int i = 0; i < (int)(s.size()); i++) {
    if (s[i] == '(')
      o++;
    else
      c++;
    if (s[i] == '#') sharp++, idx = i;
    if (c > o) {
      puts("-1");
      return 0;
    }
  }
  int ans = o - c + 1;
  o = c = 0;
  for (int i = 0; i < (int)(s.size()); i++) {
    if (s[i] == '(')
      o++;
    else if (i == idx)
      c += ans;
    else
      c++;
    if (c > o) {
      puts("-1");
      return 0;
    }
  }
  for (int i = 0; i < sharp - 1; i++) cout << 1 << "\n";
  cout << ans << "\n";
  return 0;
}
