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

-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>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std;
const long long MOD = 1e+9 + 7;
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int INFi = 0x7f7f7f7f;
const long long N = 3e+5 + 7;
vector<long long> adj[N];
long long vis[N] = {};
int dx8[] = {0, 1, 1, 1, 0, -1, -1, -1}, dy8[] = {1, 1, 0, -1, -1, -1, 0, 1};
int dx4[] = {0, 1, 0, -1}, dy4[] = {1, 0, -1, 0};
int t = 1;
long long n;
string second, s1;
void MAIN() {
  cin >> second;
  n = second.size();
  second = "#" + second + "#";
  ;
  s1 = second;
  long long pos = n + 1;
  for (long long i = 1; i <= n; i++)
    if (second[i] == '#') pos = i;
  long long counter1 = 0;
  long long counter = 0;
  long long val = 0;
  for (long long i = pos + 1; i <= n; i++) {
    if (second[i] == '(')
      counter1++;
    else
      counter1--;
    if (counter1 == -1) {
      cout << -1;
      return;
    }
  }
  if (counter1 > 0) {
    cout << -1;
    return;
  }
  for (long long i = 1; i <= n; i++) {
    if (second[i] == '#' && i != pos) second[i] = ')';
    if (i == pos) {
      if (counter + counter1 <= 0) {
        cout << -1;
        return;
      } else
        val = counter + counter1;
    }
    if (second[i] == '(')
      counter++;
    else
      counter--;
    if (counter == -1) {
      cout << -1;
      return;
    }
  }
  for (long long i = 1; i <= n; i++) {
    if (i == pos) {
      cout << val << "\n";
      break;
    }
    if (s1[i] == '#') cout << 1 << "\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed;
  cout << setprecision(10);
  ;
  mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
  ;
  while (t--) {
    MAIN();
  }
}
