#include <bits/stdc++.h>
using namespace std;
char s[100005];
int main() {
  scanf("%s", s);
  int n = strlen(s);
  int lvl = 0;
  vector<int> ans;
  for (int i = n - 1; i >= 0; i--) {
    if (lvl > 0) {
      printf("-1\n");
      return 0;
    }
    if (s[i] == '(')
      lvl++;
    else if (s[i] == ')')
      lvl--;
    else
      break;
  }
  lvl = 0;
  int flag = 0;
  for (int i = 0; i < n; i++) {
    if (lvl < 0) {
      printf("-1\n");
      return 0;
    }
    if (s[i] == '(') {
      if (flag > 1) {
        if (!lvl || lvl < flag) {
          printf("-1\n");
          return 0;
        }
        while (flag > 1) ans.push_back(1), flag--, lvl--;
      } else if (flag && lvl == 0) {
        printf("-1\n");
        return 0;
      }
      lvl++;
    } else if (s[i] == ')')
      lvl--;
    else {
      flag++;
    }
  }
  if (flag) {
    if (lvl <= 0 || lvl < flag) {
      printf("-1\n");
      return 0;
    }
    while (flag > 1) ans.push_back(1), flag--, lvl--;
    ans.push_back(lvl);
  }
  for (int i = 0; i < (int)ans.size(); i++) printf("%d\n", ans[i]);
  return 0;
}
