#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[100005];
  cin >> str;
  int n = strlen(str);
  int i = 0;
  vector<char> v;
  int pos;
  int tot = 0;
  int a = 0, b = 0, c = 0;
  while (i < n) {
    if (str[i] == '#') pos = i;
    if (str[i] == '(') a++;
    if (str[i] == ')') b++;
    if (str[i] == '#') c++;
    i++;
  }
  tot = a - b - c + 1;
  if (a < b + c)
    cout << "-1";
  else {
    i = 0;
    while (i < n) {
      if (i != pos) {
        if (str[i] != '#')
          v.push_back(str[i]);
        else {
          v.push_back(')');
          b++;
        }
      } else {
        for (int j = 1; j <= tot; j++) v.push_back(')');
      }
      i++;
    }
    int s = v.size();
    int a = 0;
    int b = 0;
    int flag = 1;
    for (int i = 0; i < s; i++) {
      if (v[i] == '(')
        a++;
      else
        b++;
      if (b > a) {
        flag = 0;
        break;
      }
    }
    if (flag == 0)
      cout << "-1";
    else {
      for (int i = 0; i < n; i++) {
        if (str[i] == '#') {
          if (i != pos)
            cout << "1\n";
          else
            cout << tot;
        }
      }
    }
  }
  return 0;
}
