#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long INFl = 4223372036854775807ll;
const int inf = 1e9 + 7;
long long power(long long x, long long y, long long z) {
  long long t = 1;
  while (y > 0) {
    if (y % 2) {
      t = (t * x) % z;
    }
    x = (x * x) % z;
    y /= 2;
  }
  return t;
}
int movex[4] = {0, 1, -1, 0};
int movey[4] = {1, 0, 0, -1};
int movexx[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
int moveyy[8] = {1, 1, 1, 0, -1, -1, -1, 0};
const int CS = 2005;
int n, m, sz;
char S[100005];
int main() {
  int i, now = 0;
  scanf("%s", S);
  n = strlen(S);
  for (i = 0; i < n; i++) {
    if (S[i] == '(') now++;
    if (S[i] == ')') now--;
    if (S[i] == '#') sz++;
    if (now - sz < 0) return !printf("-1");
  }
  int cur = 0;
  for (i = n - 1; S[i] != '#'; i--) {
    if (S[i] == ')')
      cur++;
    else
      cur--;
    if (cur < 0) return !printf("-1");
  }
  for (i = 1; i < sz; i++) printf("1\n");
  printf("%d", now - sz + 1);
  return 0;
}
