#include <bits/stdc++.h>
using namespace std;
template <typename T>
void dbg(T t) {
  cerr << t << endl;
}
template <typename T, typename... Args>
void dbg(T t, Args... args) {
  cerr << t << " ";
  dbg(args...);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  ;
  string s;
  int o = 0, b = 0, p = 0, d = 0;
  cin >> s;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '(')
      o++;
    else if (s[i] == ')')
      o--;
    else
      break;
    if (o > 0) return cout << -1 << endl, 0;
  }
  o = 0;
  for (char c : s) {
    if (c == '#')
      o--, d++, p = o;
    else if (c == '(')
      o++;
    else
      o--;
    if (o < 0) return cout << -1 << endl, 0;
  }
  if (o > p) cout << -1 << endl;
  for (int i = 0; i < d - 1; i++) cout << 1 << '\n';
  cout << o + 1 << '\n';
  return 0;
}
