#include <bits/stdc++.h>
using namespace std;
string s;
int n, sk[110000], pos, sum[110000];
int main() {
  cin >> s;
  n = s.length();
  sum[0] = 0;
  for (int i = 1; i <= n; i++) {
    if (s[i - 1] == '(')
      sum[i] = sum[i - 1] + 1;
    else {
      sum[i] = sum[i - 1] - 1;
      if (sum[i] < 0) {
        cout << -1;
        return 0;
      }
      if (s[i - 1] == '#') {
        sk[i] = 1;
        pos = i;
      }
    }
  }
  sk[pos] += sum[n];
  for (int i = 1; i <= n; i++) {
    if (s[i - 1] == '(')
      sum[i] = sum[i - 1] + 1;
    else {
      if (s[i - 1] == '#')
        sum[i] = sum[i - 1] - sk[i];
      else
        sum[i] = sum[i - 1] - 1;
      if (sum[i] < 0) {
        cout << -1;
        return 0;
      }
    }
  }
  for (int i = 1; i <= n; i++)
    if (s[i - 1] == '#') cout << sk[i] << endl;
  return 0;
}
