#include <bits/stdc++.h>
using namespace std;
bool comp(pair<long, long>& x, pair<long, long>& y) {
  if (x.first == y.first) return x.second < y.second;
  return x.first < y.first;
}
int main(void) {
  string str;
  cin >> str;
  long n = str.size();
  long sum = 0, m = 0;
  vector<long> ans;
  for (long i = 0; i < n; i++) {
    if (sum < 0 || (m && ans[m - 1] <= 0)) {
      printf("-1");
      return 0;
    }
    if (str[i] == '#') {
      if (sum == 0) {
        if (!m || ans[m - 1] == 1) {
          printf("-1");
          return 0;
        } else {
          ans.push_back(sum + ans[m - 1] - 1);
          ans[m - 1] = 1;
          m++;
          sum = 0;
        }
      } else if (!m) {
        ans.push_back(sum);
        sum = 0;
        m++;
      } else {
        ans.push_back(ans[m - 1] + sum - 1);
        ans[m - 1] = 1;
        m++;
        sum = 0;
      }
    } else if (str[i] == '(') {
      sum++;
    } else {
      sum--;
      if (m && sum < 0) {
        ans[m - 1]--;
        sum++;
      }
    }
  }
  if (sum || (m && ans[m - 1] <= 0)) {
    printf("-1");
    return 0;
    ;
  }
  for (long i = 0; i < m; i++) cout << ans[i] << endl;
  return 0;
}
