#include <bits/stdc++.h>
using namespace std;
vector<int> res;
int main() {
  string str;
  cin >> str;
  int cnt = 0;
  for (int i = 0; i < str.size(); i++)
    if (str[i] == '(') cnt++;
  int tmp = 0, cnt2 = 0, pfin = 0;
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == '(') tmp++;
    if (str[i] == ')') tmp--;
    if (str[i] == '#') {
      pfin = i;
      str[i] = ')';
      tmp--;
      cnt2++;
    }
  }
  int fin = tmp > 0 ? tmp : 0;
  tmp = 0;
  for (int i = 0; i < str.size(); i++) {
    if (tmp < 0) break;
    if (str[i] == '(') tmp++;
    if (str[i] == ')') tmp--;
    if (pfin == i) tmp -= fin;
  }
  if (tmp != 0)
    puts("-1");
  else {
    for (int i = 0; i < cnt2 - 1; i++) puts("1");
    cout << fin + 1 << endl;
  }
  return 0;
}
