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

-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;
template <typename T>
T gcd(T a, T b) {
  while (b > 0) {
    a %= b;
    swap(a, b);
  }
  return a;
}
template <class _T>
inline _T sqr(const _T& first) {
  return first * first;
}
template <class _T>
inline string tostr(const _T& a) {
  ostringstream os("");
  os << a;
  return os.str();
}
const long double PI = 3.1415926535897932384626433832795L;
const double EPS = 1e-9;
char TEMPORARY_CHAR;
const int INF = 1e9;
inline void input(int& a) {
  a = 0;
  while (((TEMPORARY_CHAR = getchar()) > '9' || TEMPORARY_CHAR < '0') &&
         (TEMPORARY_CHAR != '-')) {
  }
  char neg = 0;
  if (TEMPORARY_CHAR == '-') {
    neg = 1;
    TEMPORARY_CHAR = getchar();
  }
  while (TEMPORARY_CHAR <= '9' && TEMPORARY_CHAR >= '0') {
    a = 10 * a + TEMPORARY_CHAR - '0';
    TEMPORARY_CHAR = getchar();
  }
  if (neg) a = -a;
}
inline void out(long long a) {
  if (!a) putchar('0');
  if (a < 0) {
    putchar('-');
    a = -a;
  }
  char s[20];
  int i;
  for (i = 0; a; ++i) {
    s[i] = '0' + a % 10;
    a /= 10;
  }
  for (int j = (i)-1; j >= 0; j--) putchar(s[j]);
}
inline int nxt() {
  int(ret);
  input((ret));
  ;
  return ret;
}
int main() {
  string s;
  cin >> s;
  int cnt = 0;
  int was[s.length()];
  memset((was), 0, sizeof(was));
  vector<int> ans;
  int pos = -1;
  for (char c : s) {
    pos++;
    if (c == ')') {
      if (cnt == 0) {
        while (!ans.empty() && was[ans.back()] == 1) {
          ans.pop_back();
        }
        if (!ans.empty()) {
          was[ans.back()]--;
          continue;
        } else {
          puts("-1");
          return 0;
        }
      }
      --cnt;
      continue;
    }
    if (c == '(') {
      ++cnt;
      continue;
    }
    if (cnt == 0) {
      while (!ans.empty() && was[ans.back()] == 1) {
        ans.pop_back();
      }
      if (!ans.empty()) {
        was[ans.back()]--;
        ++cnt;
      } else {
        puts("-1");
        return 0;
      }
    }
    if (cnt == 0) {
      puts("-1");
      return 0;
    }
    ans.push_back(pos);
    was[pos] = cnt;
    cnt = 0;
  }
  while (cnt) {
    while (!ans.empty() && was[ans.back()] == 1) {
      ans.pop_back();
    }
    if (ans.empty()) {
      puts("-1");
      return 0;
    }
    was[ans.back()]--;
  }
  for (int i = 0; i < (int)s.length(); ++i) {
    if (was[i]) {
      cout << was[i] << "\n";
    }
  }
  return 0;
}
