#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 10;
long long int vis[N];
vector<vector<int> > v;
int dfs(int t) {
  vis[t] = 1;
  for (int i = 0; i < v[t].size(); i++) {
    if (vis[v[t][t]] == 0) {
      dfs(v[t][i]);
    }
  }
  return 0;
}
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int lcm(int a, int b) { return a * (b / gcd(a, b)); }
vector<vector<int> > v2;
vector<int> v1;
int vis1[200005];
void printDivisors(int n) {
  for (int i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i)
        v1.push_back(i);
      else {
        v1.push_back(i);
        v1.push_back(n / i);
      }
    }
  }
}
int main() {
  string s;
  cin >> s;
  int flag = 0, cnt1 = 0, cnt2 = 0, ind = -1, v = 0;
  for (int i = 0; i < (int)(s.size()); i++) {
    if (s[i] == ')' or s[i] == '#') {
      cnt1++;
    } else
      cnt2++;
    if (cnt1 > cnt2) flag = 1;
  }
  for (int i = (int)(s.size()) - 1; i >= 0; i--) {
    if (s[i] == '#') {
      ind = i;
      break;
    }
    if (s[i] == ')') v++;
  }
  cnt1 = 0;
  int cnt3 = 0;
  for (int i = 0; i < (int)(s.size()); i++) {
    if (s[i] == ')')
      cnt1++;
    else if (s[i] == '#')
      cnt3++;
  }
  if (flag)
    printf("%d\n", -1);
  else {
    int h = cnt2 - (cnt3 + cnt1 - 1);
    if (h <= 0)
      printf("%d\n", -1);
    else {
      cnt1 = 0;
      cnt2 = 0;
      for (int i = 0; i < (int)(s.size()); i++) {
        if (i == ind) {
          for (int j = 0; j < h; j++) {
            cnt1++;
          }
        } else if (s[i] == ')' or s[i] == '#') {
          cnt1++;
        } else
          cnt2++;
        if (cnt1 > cnt2) flag = 1;
      }
      if (flag)
        printf("%d\n", -1);
      else {
        for (int i = 0; i < (int)(s.size()); i++) {
          if (i == ind)
            printf("%d\n", h);
          else if (s[i] == '#')
            printf("%d\n", 1);
        }
      }
    }
  }
  return 0;
}
