#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  vector<int> veci;
  stack<int> st;
  for (int i = 0; i < (int)s.size(); i++) {
    if (s[i] == '(')
      st.push(i);
    else if (s[i] == ')' && !st.empty())
      s[i] = s[st.top()] = '_', st.pop();
  }
  int last = (int)s.size() - 1;
  for (; last >= 0 && s[last] != '#'; last--)
    ;
  int c = 0, flg = 1;
  for (int i = 0; i < (int)s.size(); i++)
    if (s[i] == '(')
      c++;
    else if (s[i] == '#' && c > 0) {
      if (i == last)
        veci.push_back(c), c = 0;
      else
        veci.push_back(1), c--;
    } else if (s[i] != '_')
      flg = 0;
  if (veci.empty() || !flg || c)
    cout << -1;
  else
    for (int i = 0; i < (int)veci.size(); i++) cout << veci[i] << endl;
}
