#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int dem = 0, dem1 = 0, thang = 0;
  int ns = s.size();
  for (int i = 0; i < ns; i++) {
    if (s[i] == '(')
      dem++;
    else
      dem--;
    if (s[i] == '#') thang++;
  }
  if (dem < 0) {
    cout << -1;
    return 0;
  }
  int thang1 = 0, res;
  for (int i = 0; i < ns; i++) {
    if (s[i] == '(')
      dem1++;
    else
      dem1--;
    if (s[i] == '#') {
      thang1++;
      if (thang1 == thang) {
        res = dem + 1;
        dem1 = dem1 - dem;
      }
    }
    if (dem1 < 0) {
      cout << -1;
      return 0;
    }
  }
  if (dem1 != 0) {
    cout << -1;
    return 0;
  }
  int t = 0;
  for (int i = 0; i < ns; i++) {
    if (s[i] == '#') {
      t++;
      if (t != thang)
        cout << 1 << endl;
      else {
        cout << res;
        break;
      }
    }
  }
}
