#include <bits/stdc++.h>
#pragma GCC optimize("O2")
#pragma GCC optimize("unroll-loops")
using namespace std;
const int MAX = 1e3 + 5;
const long long MAX2 = 11;
const long long MOD = 1000000007;
const long long MOD2 = 1000005329;
const long long INF = 2e18;
const int dr[] = {1, 0, -1, 0, 1, 1, -1, -1, 0};
const int dc[] = {0, 1, 0, -1, 1, -1, 1, -1, 0};
const double pi = acos(-1);
const double EPS = 1e-9;
const int block = 555;
int n, ls, cnt, hit, jl;
string s;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  n = s.size(), s = 'a' + s;
  for (int i = 1; i <= n; ++i) {
    if (s[i] == '(')
      ++cnt;
    else if (s[i] == ')')
      --cnt;
    else
      --cnt, ls = i, ++jl;
  }
  if (cnt < 0) return cout << "-1\n", 0;
  hit = cnt, cnt = 0;
  for (int i = 1; i <= n; ++i) {
    if (s[i] == '(')
      ++cnt;
    else if (s[i] == ')')
      --cnt;
    else
      --cnt;
    if (i == ls) cnt -= hit;
    if (cnt < 0) return cout << "-1\n", 0;
  }
  if (cnt != 0) return cout << "-1\n", 0;
  for (int i = 2; i <= jl; ++i) cout << "1\n";
  cout << hit + 1 << '\n';
  return 0;
}
