#include <bits/stdc++.h>
using namespace std;
int fang1[][2] = {-1, 0, 1, 0, 0, -1, 0, 1};
int main() {
  string s;
  while (getline(cin, s, '\n')) {
    int n1, n2, n3;
    n1 = n2 = n3 = 0;
    for (int i = (0); i < (s.size()); i++) {
      if (s[i] == '(') n1++;
      if (s[i] == '#') n2++;
      if (s[i] == ')') n3++;
    }
    if (n1 < n3 + n2) {
      printf("-1\n");
      continue;
    }
    int num2 = n2;
    int num = n1 - n3 - (n2 - 1);
    for (int i = (0); i < (s.size()); i++) {
      if (s[i] == '#' && n2 > 1) {
        s[i] = ')';
        n2--;
        continue;
      }
      if (s[i] == '#' && n2 == 1) {
        s[i] = ')';
        n2 = 0;
        s.insert(s.begin() + i, num - 1, ')');
        continue;
      }
    }
    n1 = n2 = 0;
    int flag = 0;
    for (int i = (0); i < (s.size()); i++) {
      if (s[i] == '(') n1++;
      if (s[i] == ')') n2++;
      if (n1 >= n2)
        continue;
      else {
        flag = 1;
        break;
      }
    }
    if (flag)
      printf("-1\n");
    else {
      for (int i = (0); i < (num2); i++) {
        if (i != num2 - 1)
          printf("1\n");
        else
          printf("%d\n", num);
      }
    }
  }
  return 0;
}
