#include <bits/stdc++.h>
using namespace std;
char s[100001];
int main() {
  scanf("%s", &s);
  int c1 = 0, c2 = 0;
  vector<int> v;
  int n = strlen(s);
  int N = n;
  int lp = 0;
  int k1 = 0;
  for (int(i) = 0; (i) < (n); (i)++)
    if (s[i] == '(') k1++;
  for (int(i) = 0; (i) < (n); (i)++)
    if (s[i] == ')') k1--;
  for (int(i) = 0; (i) < (n); (i)++)
    if (s[i] == '#') lp = i;
  int tt = 0;
  for (int(i) = 0; (i) < (n); (i)++) {
    if (s[i] == '(')
      tt++;
    else if (s[i] == ')')
      tt--;
    else if (s[i] == '#' && lp != i)
      k1--, v.push_back(1), tt--;
    else {
      if (k1 <= 0) return puts("-1");
      v.push_back(k1);
      tt -= k1;
    }
    if (tt < 0) return puts("-1");
  }
  for (int(i) = 0; (i) < (v.size()); (i)++) printf("%d\n", v[i]);
}
