#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return (b == 0 ? a : gcd(b, a % b)); }
long long lcm(long long a, long long b) { return ((a * b) / gcd(a, b)); }
long long pw(long long b, long long p) {
  if (!p) return 1;
  long long sq = pw(b, p / 2);
  sq *= sq;
  if (p % 2) sq *= b;
  return sq;
}
long long sd(long long x) { return x < 10 ? x : x % 10 + sd(x / 10); }
double sq(double x) {
  for (long long i = 0; i < x; i++)
    if ((double)i * i > x) return (i - 1);
  return double(1);
}
int main() {
  string s;
  cin >> s;
  vector<long long> out;
  int cnt1 = 0, windCnt = 0, check = 0;
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] == '(')
      ++cnt1, ++check;
    else if (s[i] == ')')
      --cnt1, --check;
    else
      ++windCnt, --check;
    if (check < 0) return puts("-1"), 0;
  }
  int cnt2 = 0, win = windCnt, cnt3 = cnt1;
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] == '(')
      cnt2++;
    else if (s[i] == ')')
      cnt2--;
    else {
      if (win == 1)
        cnt2 -= cnt3;
      else
        cnt2--, win--, --cnt3;
    }
    if (cnt2 < 0) return puts("-1"), 0;
  }
  for (long long i = 0; i < windCnt - 1; i++) puts("1");
  printf("%d", cnt1 - (windCnt - 1));
}
