#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void ruint(T& a) {
  while ((a = getchar_unlocked() - '0') < 0)
    ;
  for (register char c; (c = getchar_unlocked() - '0') >= 0;)
    a = (a << 3) + (a << 1) + c;
}
struct Reader {
  template <class T>
  Reader& operator,(T& v) {
    cin >> v;
    return *this;
  }
} RD;
struct ReaderU {
  template <class T>
  ReaderU& operator,(T& v) {
    ruint(v);
    return *this;
  }
} RU;
struct Debugger {
  template <class T>
  Debugger& operator,(const T& v) {
    cout << " " << v << flush;
    return *this;
  }
} DB;
struct classcomp {
  template <class T>
  bool operator()(const T& a, const T& b) const {
    return a > b;
  }
};
template <class T>
void Dbrng(T lo, T hi, string note = "", int w = 0) {
  if (0) {
    cout << "Debug[ ";
    if (!note.empty()) cout << setw(3) << note << " : ";
    for (; lo != hi; ++lo) cout << setw(w) << *lo << " ";
    cout << "]" << endl;
  }
}
const int INF = 0x3F3F3F3F;
string s;
int cnt, last, ans[100005];
int main() {
  if (0)
    ({
      if (*"a.in") freopen("a.in", "r", stdin);
      if (*"") freopen("", "w", stdout);
    });
  ({
    ios_base::sync_with_stdio(false);
    cin.tie(0);
  });
  cin >> s;
  for (int i = 0, _i = (s.size()); i < _i; ++i) {
    if (s[i] == '(')
      cnt++;
    else if (s[i] == ')')
      cnt--;
    else {
      ans[i] = 1;
      cnt--;
      last = i;
    }
  }
  if (cnt > 0) ans[last] += cnt;
  cnt = 0;
  for (int i = 0, _i = (s.size()); i < _i; ++i) {
    if (s[i] == '(')
      cnt++;
    else if (s[i] == ')')
      cnt--;
    else
      cnt -= ans[i];
    if (cnt < 0) return !printf("-1\n");
  }
  if (cnt != 0) return !printf("-1\n");
  for (int i = 0, _i = (s.size()); i < _i; ++i)
    if (s[i] == '#') printf("%d\n", ans[i]);
  return 0;
}
