#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int n, poz, cnt, ndiez, l, r, l0, r0;
string s;
int32_t main() {
  ios_base ::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  cin >> s;
  n = s.size();
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == '#') {
      poz = i;
      break;
    }
  }
  for (int i = 0; i < n; i++) {
    if (i < poz) {
      if (s[i] == '(')
        l++;
      else
        r++;
      if (s[i] == '#') ndiez++;
      if (l - r < 0) {
        cout << -1;
        return 0;
      }
    }
    if (i == poz) {
      l0 = l;
      r0 = r;
    }
    if (i > poz) {
      if (s[i] == '(')
        l++;
      else
        r++;
    }
  }
  if (l - r <= 0) {
    cout << -1;
    return 0;
  }
  cnt = l - r;
  l = l0;
  r = r0 + cnt;
  if (l - r < 0) {
    cout << -1;
    return 0;
  }
  for (int i = poz + 1; i < n; i++) {
    if (s[i] == '(')
      l++;
    else
      r++;
    if (l - r < 0) {
      cout << -1;
      return 0;
    }
  }
  for (int i = 1; i <= ndiez; i++) cout << 1 << '\n';
  cout << cnt;
}
