#(#(#((##((()))(((#)(#()#(((()()(()#(##(((()(((()))#(((((()(((((((()#((#((()(#(((()(()##(()(((()((#(
 (#((((()
 (#((
 ((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((##
 (())((((#)
 (#(
 (#))(#(#)((((#(##((#(#((((#(##((((((#((()(()(())((()#((((#((()((((#(((((#(##)(##()((((()())(((((#(((
 ##((((((()
 #((#
 #))))
 (((((#(#(#(#()
 ((#(()#(##
 (((((((((((((((((((###################
 )((##((###
 (((()#(#)(
 ((#)(
 )(((())#
 ()((#((#(#()
 ((#(
 ()#(#())()()#)(#)()##)#((()#)((#)()#())((#((((((((#)()()(()()(((((#)#(#((((#((##()(##(((#(()(#((#))#

-1
 -1
 -1
 1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
 3
 -1
 -1
 -1
 -1
 -1
 1
1
1
5
 1
1
1
1
 1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
 -1
 -1
 -1
 -1
 1
1
3
 -1
 -1

#include <bits/stdc++.h>
using namespace std;
map<string, int> bevNum;
struct bev {
  string name;
  vector<int> dependents;
  int dependencies;
  int decreaseDependencies() {
    dependencies--;
    return dependencies;
  }
};
bev beverages[110];
list<int> candidates;
void add_candidate(int bevId) {
  list<int>::iterator it;
  list<int>::iterator itend;
  it = candidates.begin();
  while (it != candidates.end() && *it < bevId) it++;
  candidates.insert(it, bevId);
}
void relate(string bev1, string bev2) {
  int id1 = bevNum[bev1];
  int id2 = bevNum[bev2];
  beverages[id1].dependents.push_back(id2);
  beverages[id2].dependencies++;
}
void releaseDependencies(int bevId) {
  int s = beverages[bevId].dependents.size();
  for (int i = 0; i < s; i++) {
    beverages[beverages[bevId].dependents[i]].dependencies--;
    if (beverages[beverages[bevId].dependents[i]].dependencies == 0)
      add_candidate(beverages[bevId].dependents[i]);
  }
}
int main(void) {
  long long a = 0, b = 0, c = 0;
  char str[100011];
  cin >> str;
  long long len = strlen(str);
  vector<long long> replacements;
  bool possible = true;
  for (long long i = 0; i < len && possible; i++) {
    if (str[i] == '(')
      a++;
    else if (str[i] == ')')
      b++;
    else
      c++;
    if (a < b + c) possible = false;
  }
  if (!possible)
    cout << -1 << endl;
  else {
    for (int i = 1; i < c; i++) cout << 1 << endl;
    cout << a - b - c + 1 << endl;
  }
  return (0);
}
