#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long long int INFLL = 1e18;
const double EPS = 1e-8;
template <class T>
T &chmin(T &a, const T &b) {
  return a = min(a, b);
}
template <class T>
T &chmax(T &a, const T &b) {
  return a = max(a, b);
}
string s;
int c;
int mv = INF;
int sc;
int main() {
  cin >> s;
  int n = s.length();
  for (int i = (0); i < (int)(n); i++) {
    if (s[i] == '(')
      c++;
    else
      c--;
    if (c < 0) return puts("-1");
    if (s[i] == '#') mv = c, sc++;
    chmin(mv, c);
  }
  if (mv < c) return puts("-1");
  for (int i = (0); i < (int)(sc - 1); i++) printf("1\n");
  if (sc > 0) printf("%d\n", c + 1);
  return 0;
}
