#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  vector<int> sharp;
  queue<int> cl;
  int open = 0, close = 0, open1 = 0, close1 = 0, start = 0;
  string s;
  cin >> s;
  int lastsharp = -1;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '#') lastsharp = i;
  }
  if (lastsharp == -1) {
    cout << "-1";
    return 0;
  }
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '(') {
      open++;
      if (i > lastsharp) start++;
    } else if (s[i] == ')') {
      close++;
      if (i > lastsharp) {
        start--;
        if (start < 0) start = 0;
      }
    } else if (i != lastsharp) {
      close++;
      sharp.push_back(1);
    }
    if (close + close1 > open + open1) {
      cout << -1;
      return 0;
    }
    if (i == lastsharp) {
      open1 = open;
      close1 = close;
      open = 0;
      close = 0;
    }
  }
  if (close < open) {
    cout << -1;
    return 0;
  }
  if (open1 + open - close1 - close == 0) {
    cout << -1;
    return 0;
  }
  if (start > 0) {
    cout << -1;
    return 0;
  }
  sharp.push_back(open1 + open - close1 - close);
  for (int i = 0; i < sharp.size(); i++) cout << sharp[i] << endl;
}
