#include <bits/stdc++.h>
using namespace std;
const int INF = (int)(INT_MAX - 100);
const int N = (int)(0);
const long long mod = (int)(1e+9 + 7);
int a, b;
int main() {
  string s;
  cin >> s;
  vector<int> v;
  for (int i = 0; i < int(s.size()); i++) {
    a += (s[i] == ')');
    b += (s[i] == '(');
    if (s[i] == '#') {
      a++;
      v.push_back(1);
    }
  }
  if (b > a) v[int(v.size()) - 1] += b - a;
  int pos;
  a = b = pos = 0;
  for (int i = 0; i < int(s.size()); i++) {
    a += (s[i] == ')');
    b += (s[i] == '(');
    if (s[i] == '#') a += v[pos++];
    if (a > b) return printf("%d\n", -1), 0;
  }
  for (auto x : v) printf("%d\n", x);
  return 0;
}
