#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 77;
int main() {
  string s;
  cin >> s;
  int lasth = -1;
  int suma = 0;
  bool dasie = true;
  int ile = 0;
  for (int i = 0; i < (int)s.size(); i++) {
    if (s[i] == '#') lasth = i;
    if (s[i] == '(')
      suma++;
    else
      suma--;
    if (suma < 0) dasie = false;
  }
  int sumka = 0;
  int mini = 0;
  for (int i = lasth + 1; i < s.size(); i++) {
    if (s[i] == '(')
      sumka++;
    else
      sumka--;
    mini = min(mini, sumka);
  }
  int sumdo = suma - sumka;
  int ilex = suma + 1;
  if (-mini > sumdo + 1 - ilex or sumka > 0 or sumdo + 1 - suma - 1 < 0) {
    dasie = false;
  }
  if (dasie) {
    for (int i = 0; i < (int)s.size(); i++) {
      if (s[i] == '#' && i != lasth) {
        cout << 1 << " ";
      }
    }
    cout << suma + 1 << endl;
  } else {
    cout << -1 << endl;
  }
}
