public static void balanced_brackets(String s) {

        Stack<Boolean> stack = new Stack<>();
        boolean open = true;
        for (int i = 0; i < s.length(); i++) {
            if(s.charAt(i) == '(') {
                stack.push(open);
            } else {
                if (stack.empty()) {
                    System.out.println("Unbalanced");
                    return;
                }
                stack.pop();
            }

        }

        System.out.println("Balanced");
    }