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

-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

/*
 *created by Kraken on 02-05-2020 at 01:42
 */
//package com.kraken.cf.practice;

import java.util.*;
import java.io.*;

public class A494 {

  public static void main(String[] args) {
    FastReader sc = new FastReader();
    char[] c = sc.next().toCharArray();
    int n = c.length;
    long[] bal = new long[n];
    long cnt = 0;
    boolean fine = true;
    int last = -1;
    for (int i = 0; i < n; i++) {
      if (i > 0) bal[i] = bal[i - 1];
      if (c[i] == '(') bal[i]++;
      else bal[i]--;
      if (c[i] == '#') {
        cnt++;
        last = i;
      }
      if (bal[i] < 0) {
        fine = false;
        break;
      }
    }
    if (!fine) {
      System.out.println(-1);
      return;
    }
    if (bal[n - 1] == 0) {
      StringBuilder sb = new StringBuilder();
      for (int i = 0; i < n; i++) sb.append(1).append("\n");
      System.out.println(sb);
      return;
    }
    long lc = bal[n - 1];
    long nb = 0;
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < n; i++) {
      if (c[i] == '(') nb++;
      else if (c[i] == ')') nb--;
      else {
        if (i == last) {
          nb -= lc + 1;
          sb.append(lc + 1).append("\n");
        } else {
          nb--;
          sb.append(1).append("\n");
        }
      }
    }
    if (nb != 0) {
      System.out.println(-1);
      return;
    }
    System.out.print(sb.toString());
  }

  static class FastReader {

    BufferedReader br;

    StringTokenizer st;

    public FastReader() {
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        }
        catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

    int nextInt() {
      return Integer.parseInt(next());
    }

    long nextLong() {
      return Long.parseLong(next());
    }

    double nextDouble() {
      return Double.parseDouble(next());
    }

    String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      }
      catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    }
  }
}
