#include <bits/stdc++.h>
using namespace std;
char s[1000010];
int main() {
  int n;
  cin >> s;
  n = strlen(s);
  int open = 0, close = 0, hashh = 0, i, j, hashd = 0, xx, r, boy;
  for (i = 0; s[i] != '\0'; i++) {
    if (s[i] == '(')
      open++;
    else if (s[i] == ')')
      close++;
    else if (s[i] == '#') {
      hashh++;
    }
  }
  xx = open - close - hashh;
  if (xx < 0)
    cout << -1;
  else {
    hashd = 0;
    for (i = 0; s[i] != '\0'; i++) {
      if (s[i] == '#' && hashd != (hashh - 1)) {
        s[i] = ')';
        hashd++;
      } else if (s[i] == '#' && hashd == hashh - 1) {
        s[i] = ')';
        hashd++;
        break;
      }
    }
    for (j = n - 1 + xx; j >= (i + 1 + xx); j--) {
      s[j] = s[j - xx];
    }
    s[n + xx] = '\0';
    for (j = i + 1; j <= i + xx; j++) s[j] = ')';
    r = 0;
    boy = 0;
    for (i = 0; s[i] != '\0'; i++) {
      if (r < 0) {
        boy = 1;
        break;
      } else if (s[i] == '(')
        r++;
      else if (s[i] == ')')
        r--;
    }
    if (boy == 1)
      cout << -1 << endl;
    else {
      for (i = 1; i <= hashh - 1; i++) cout << 1 << endl;
      cout << xx + 1;
    }
  }
}
