#include <bits/stdc++.h>
using namespace std;
const long long MAX = -1000000000000000000;
const long long MIN = 1000000000000000000;
const long long inf = 1000000000;
const long long KOK = 100000;
const long long LOG = 30;
const long long li = 500005;
const long long mod = 1000000007;
int n, m, b[li], a[li], k, flag, t, yes, say, ind, cev1, mn, cev2;
int cev;
string s;
vector<int> v;
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> s;
  for (int i = 0; i < (int)s.size(); i++) {
    if (s[i] == '#') {
      say++;
      ind = i;
    }
  }
  for (int i = 0; i < (int)s.size(); i++) {
    if (ind == i) {
      if (cev <= 0) {
        printf("-1\n");
        return 0;
      }
      a[1] = cev;
      cev = 0;
      continue;
    }
    if (i > ind) {
      if (s[i] == '(')
        cev++;
      else if (s[i] == ')' && cev > 0) {
        cev--;
      } else if (s[i] == ')' && a[1] > 1) {
        a[1]--;
      } else {
        printf("-1\n");
        return 0;
      }
    } else {
      if (s[i] == '(')
        cev++;
      else
        cev--;
      if (cev < 0) {
        printf("-1\n");
        return 0;
      }
    }
  }
  if (cev > 0) {
    printf("-1\n");
    return 0;
  }
  for (int i = 1; i < say; i++) printf("1\n");
  printf("%d\n", a[1]);
  return 0;
}
